ホームページ  >  記事  >  運用・保守  >  centos yumが使えない問題の解決方法

centos yumが使えない問題の解決方法

尚
オリジナル
2020-03-25 16:47:583270ブラウズ

centos yumが使えない問題の解決方法

yum を使用して gcc をインストールすると、エラーが報告されました:

[root@001 ~]#yum -y install gcc gcc-c++ kernel-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>

1. ネットワークが切断されているかどうかを確認してください

ping www.baidu.com

2.ネットワークは切断されていません。これは、yum ミラーがなくなっているため、ミラーをダウンロードする必要があることを意味します:

cd /etc/yum.repos.d
 
mv CentOS-Base.repo CentOS-Base.repo.backup
 
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
 
mv CentOS6-Base-163.repo CentOS-Base.repo
 
yum clean all

関連ビデオ チュートリアルの推奨事項: linux ビデオ チュートリアル

以上がcentos yumが使えない問題の解決方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。