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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux 安裝yum 安裝phpLinuxPHP
- Linux 安裝 yumLinux
- yum安裝ansible
- yum 安裝 jenkinsJenkins
- yum安裝nginxNginx
- mysql yum 安裝MySql
- yum 安裝 PHPPHP
- CentOS7系統安裝後使用yum install 出現的問題CentOS
- yum安裝軟體時,出現"No package XXX available"的解決辦法PackageAI
- CentOS安裝配置yumCentOS
- AIX的yum安裝AI
- 【Linux】yum 安裝nginxLinuxNginx
- postgres yum源安裝
- 安裝最新版MySQL(yum安裝)MySql
- yum安裝與原始碼安裝比較原始碼
- Linux下安裝java及配置(yum安裝)LinuxJava
- PostgreSQL 10.12 安裝系列 - Yum+rpm 安裝SQL
- 一鍵安裝yum-utils安裝包
- yum安裝kubeadm、kubelet、kubectl
- Centos 7 yum 安裝nginxCentOSNginx
- CentOS 7 yum 安裝 NGINXCentOSNginx
- CentOS 7 yum 安裝 MySQLCentOSMySql
- yum安裝簡潔版
- Linux安裝MySQL(使用yum)LinuxMySql
- centos 7中 yum安裝jdkCentOSJDK
- Zabbix 簡介與yum安裝
- CentOs6.8 yum安裝GitLabCentOSGitlab
- 使用yum 命令安裝 dotnet 6
- CentOS 7 用yum安裝 MySQLCentOSMySql
- Ubuntu 用 deepin-wine 安裝 Tim.etcUbuntu
- shell批次yum安裝並檢查是否安裝成功
- centos7中使用yum安裝NGINX安裝CentOSNginx
- CentOS7 安裝 Mysql 8:0 的yum安裝方式CentOSMySql
- CentOS 7.0下使用yum安裝MySQLCentOSMySql
- CentOS 7 yum 安裝與配置 JDKCentOSJDK
- CentOS 7 yum 安裝與配置 RedisCentOSRedis
- CentOS 7 yum安裝與配置 TomcatCentOSTomcat
- 安裝 Docker-yum-阿里雲映象Docker阿里