Linux使用错误小结(CentOS)- yum更新软件失败
生活随笔
收集整理的這篇文章主要介紹了
Linux使用错误小结(CentOS)- yum更新软件失败
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
yum使用條件:yum的使用要保證internet網絡連通,和“cat /etc/resolv.conf”文件下存在“nameserver 8.8.8.8”才可正常更新。? yum,是Yellow dog Updater, Modified 的簡稱,是杜克大學為了提高RPM 軟件包安裝性而開發的一種軟件包管理器。
yum 的宗旨是自動化地升級,安裝/移除rpm 包,收集rpm 包的相關信息,檢查依賴性并自動提示用戶解決。自動解決包的倚賴性問題,便于管理大量系統的更新問題。yum 的關鍵之處是要有可靠的repository。以下文件在重啟系統(CentOS) 或 重啟網路服務,修改“cat /etc/sysconfig/network-scripts/ifcfg-enp0s3”文件后: [root@localhost install-files]# service network restart
會導致,“cat /etc/resolv.conf”此文件更新,“nameserver 8.8.8.8”自動刪除。
配置如下(confA1): [root@localhost install-files]# cat /etc/resolv.conf # Generated by NetworkManager search lan nameserver fd7b:ac2f:6d73::1 nameserver 8.8.8.8 問題1: 如果在配置: [root@localhost install-files]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3 配置:DNS=192.168.10.1
則會導致“cat /etc/resolv.conf”文件異常更新,如下: # Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com 解決1: 應該注釋:“cat /etc/sysconfig/network-scripts/ifcfg-enp0s3”文件: #DNS=192.168.10.1 然后重啟網路服務生效“service network restart”,
然后,類似以上(confA1)的配置,就可以ok使用。 問題2: One of the configured repositories failed (未知),
?and yum doesn't have enough cached data to continue. At this point the only
?safe thing yum can do is fail. There are a few ways to work "fix" this:
?....
?Cannot find a valid baseurl for repo: base/7/x86_64 解決2:“cat /etc/resolv.conf”文件中增加“nameserver 8.8.8.8”解決。 問題3: [root@localhost log]# yum install telnet
Loaded plugins: fastestmirror
http://mirrors.btte.net/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.btte.net; Unknown error"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.neusoft.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.hust.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.hust.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.nwsuaf.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.nwsuaf.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.pubyun.com/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.pubyun.com; Unknown error"
Trying other mirror.
http://mirrors.opencas.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.opencas.cn; Unknown error"
Trying other mirror.
http://mirror.neu.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror.neu.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.sina.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.sina.cn; Unknown error"
Trying other mirror.
………………………… 解決3:修改好ip能上網:CentOS配置ip[快速配置]
配置如下(confA1): [root@localhost install-files]# cat /etc/resolv.conf # Generated by NetworkManager search lan nameserver fd7b:ac2f:6d73::1 nameserver 8.8.8.8 問題1: 如果在配置: [root@localhost install-files]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3 配置:DNS=192.168.10.1
則會導致“cat /etc/resolv.conf”文件異常更新,如下: # Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com 解決1: 應該注釋:“cat /etc/sysconfig/network-scripts/ifcfg-enp0s3”文件: #DNS=192.168.10.1 然后重啟網路服務生效“service network restart”,
然后,類似以上(confA1)的配置,就可以ok使用。 問題2: One of the configured repositories failed (未知),
?and yum doesn't have enough cached data to continue. At this point the only
?safe thing yum can do is fail. There are a few ways to work "fix" this:
?....
?Cannot find a valid baseurl for repo: base/7/x86_64 解決2:“cat /etc/resolv.conf”文件中增加“nameserver 8.8.8.8”解決。 問題3: [root@localhost log]# yum install telnet
Loaded plugins: fastestmirror
http://mirrors.btte.net/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.btte.net; Unknown error"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.neusoft.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.hust.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.hust.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.nwsuaf.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.nwsuaf.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.pubyun.com/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.pubyun.com; Unknown error"
Trying other mirror.
http://mirrors.opencas.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.opencas.cn; Unknown error"
Trying other mirror.
http://mirror.neu.edu.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror.neu.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.sina.cn/centos/7.1.1503/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.sina.cn; Unknown error"
Trying other mirror.
………………………… 解決3:修改好ip能上網:CentOS配置ip[快速配置]
總結
以上是生活随笔為你收集整理的Linux使用错误小结(CentOS)- yum更新软件失败的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我的世界末地传送门怎么制作
- 下一篇: 媒体服务器软件Wowza Streami