日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

yum install 失败

發(fā)布時(shí)間:2023/12/9 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 yum install 失败 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

https://blog.csdn.net/weixin_45621658/article/details/110734514

原因:centos6的默認(rèn)源在2012年-12月左右被官方搞掉了
下列是錯(cuò)誤詳情
Bash
[root@c8-20 ~]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
1
2
3
4
5
6
7
或者
Bash
[root@li496-237 ~]# yum -y install unzip zip
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
http://mirrors.linode.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn’t help to resolve this issue please open a ticket with Red Hat Support.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
第一種方法:一鍵修復(fù)(一條一條執(zhí)行即可):
一般執(zhí)行了前3條命令就好了
Bash
sed -i “s|enabled=1|enabled=0|g” /etc/yum/pluginconf.d/fastestmirror.conf
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
yum clean all
yum makecache
1
2
3
4
5
第二種方法:手動(dòng)修復(fù)教程:
首先把fastestmirrors關(guān)了
Markup
#編輯
vi /etc/yum/pluginconf.d/fastestmirror.conf
1
#修改
enable=0
1
#或者執(zhí)行以下命令
sed -i “s|enabled=1|enabled=0|g” /etc/yum/pluginconf.d/fastestmirror.conf
1
先把之前的repo挪到備份,然后下面兩個(gè)二選一
Markup
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
1
替換為官方Vault源
Markup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Official.repo
1
替換為阿里云Vault鏡像
Markup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo

Gedit報(bào)錯(cuò)

Gtk-WARNING **: cannot open display: 問(wèn)題解決
這幾天在ubutu上用vim一直出問(wèn)題,網(wǎng)上找了很多解決方法都沒有解決,然后朋友推薦用gedit文本編輯器,好吧,那就試試。
在root用戶運(yùn)行g(shù)edit時(shí),提示出錯(cuò)

然后百度,說(shuō)是因?yàn)?#xff1a;Xserver默認(rèn)情況下不允許別的用戶的圖形程序的圖形顯示在當(dāng)前屏幕上. 如果需要?jiǎng)e的用戶的圖形顯示在當(dāng)前屏幕上, 則應(yīng)以當(dāng)前登陸的用戶, 也就是切換身份前的用戶執(zhí)行如下命令。
當(dāng)前登陸普通用戶執(zhí)行:xhost +

總結(jié)

以上是生活随笔為你收集整理的yum install 失败的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。