yum安裝 一直出現There are no enabled repositories in “/etc/yum.repos.d“
在CentOS中使用yum命令出現報錯:
1 yum -y install git
error:There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d
vi /etc/yum.repos.dopenEuler_x86_64.repo
#generic-repos is licensed under the Mulan PSL v2. #You can use this software according to the terms and conditions of the Mulan PSL v2. #You may obtain a copy of Mulan PSL v2 at: # #THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR #IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR #PURPOSE. #See the Mulan PSL v2 for more details. [OS] name=OS baseurl= enabled=1 gpgcheck=1 gpgkey=RPM-GPG-KEY-openEuler [everything] name=everything baseurl= enabled=1 gpgcheck=1 gpgkey=RPM-GPG-KEY-openEuler [EPOL] name=EPOL baseurl= enabled=1 gpgcheck=1 gpgkey=RPM-GPG-KEY-openEuler [debuginfo] name=debuginfo baseurl= enabled=1 gpgcheck=1 gpgkey=RPM-GPG-KEY-openEuler [source] name=source baseurl= enabled=1 gpgcheck=1 gpgkey=RPM-GPG-KEY-openEuler [update] name=update baseurl= enabled=0 gpgcheck=1 gpgkey=RPM-GPG-KEY-openEuler
解決辦法
安裝yum源
cd /etc/yum.repos.d
1 ll //檢視當前目錄的所有檔案 2 rm -rf ./* //刪除當前的所有檔案
wget -O /etc/yum.repos.d/CentOS-Base.repo
ls //檢視檔案 yum -y clean all //清除所有檔案 yum -y makecache //建立快取
Error: Failed to download metadata for repo 'base'
wget -O /etc/yum.repos.d/CentOS-Base.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo
yum makecache
yum clear all
yum makecache
最後
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70003733/viewspace-2899202/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- yum安裝
- mysql安裝 (yum 安裝)MySql
- yum 安裝 PHPPHP
- mysql yum 安裝MySql
- yum安裝nginxNginx
- yum安裝lampLAMP
- yum安裝mysqlMySql
- yum 安裝軟體是出現 except OSError, e: ^ SyntaxError: invalid syntaxError
- linux 安裝yum 安裝phpLinuxPHP
- Centos 安裝yum,安裝ansibleCentOS
- yum安裝ansible
- CentOS安裝配置yumCentOS
- AIX的yum安裝AI
- postgres yum源安裝
- Linux 安裝 yumLinux
- 96.2.Yum安裝
- CentOS yum安裝mcryptCentOS
- LAMP:用yum安裝LAMP
- YUM安裝MYSQL(轉)MySql
- yum 安裝 jenkinsJenkins
- linux配置本地yum安裝--FTP yumLinuxFTP
- 安裝最新版MySQL(yum安裝)MySql
- CentOS7系統安裝後使用yum install 出現的問題CentOS
- yum安裝與原始碼安裝比較原始碼
- CentOS 7 yum 安裝 MySQLCentOSMySql
- CentOS 7 yum 安裝 NGINXCentOSNginx
- yum安裝簡潔版
- 【Linux】yum 安裝nginxLinuxNginx
- zabbix2.4yum安裝
- YUM安裝最新的MYSQLMySql
- MAC: Homebrew(代替yum)安裝Mac
- Redhat 5 上安裝yumRedhat
- yum的安裝與配置
- yum安裝及使用全集
- CentOS下yum安裝MySQLCentOSMySql
- Centos 7 yum 安裝nginxCentOSNginx
- Linux下安裝java及配置(yum安裝)LinuxJava
- yum安裝軟體時,出現"No package XXX available"的解決辦法PackageAI