我无法使用yum命令安装任何服务。当我尝试通过键入以下命令安装httpd时
[root@kstest /]# yum install httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable"
* base: centos.aol.in
* extras: centos-hn.viettelidc.com.vn
* updates: centos.aol.in
http://centos.aol.in/6.5/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos.aol.in/6.5/os/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
Trying other mirror.
之后,当我尝试使用yum命令时,它显示
Existing lock /var/run/yum.pid: another copy is running as pid 2063.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 22 M RSS (219 MB VSZ)
Started: Mon Jul 21 05:09:53 2014 - 01:09 ago
State : Traced/Stopped, pid: 2063
来解锁我输入的
ps aux | grep yum
kill -9 <pid number>
当我试图通过键入更新yum时
yum update -y
我得到以下信息
[root@kstest etc]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.aol.in
* extras: centos-hn.viettelidc.com.vn
* updates: centos.aol.in
http://centos.aol.in/6.5/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos.aol.in/6.5/os/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
Trying other mirror.
如何解决这个问题?如何安装httpd?
我的yum.repos.d文件在etc/中是空的。我的yum.conf文件是空的。
[main]
proxy=http://proxy.com:8000
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
代理我已经添加了它。它从以前就不存在了。
3条答案
按热度按时间vbopmzt11#
我从6.4开始就遇到了同样的问题,我仍然很震惊没有一个容易找到的解决方案。快速的解决方法是注解掉所有的mirrorlist行,取消注解所有的baseurl行,但是根据一些论坛的一些人的说法,这不是一件好事。
ykejflvf2#
这个问题可以通过修复你的网络设置来解决。IPv6镜像并不是在所有的设置中都起作用。我使用Ansible所做的是禁用IPv6,同时使用Google的公共解析器。剧本假设SELinux被禁用。
x6yk4ghg3#
如果您在**/etc/yum.conf**中定义代理主机服务器,则所有使用者在使用yum时,都会使用这些详细信息联机至代理主机服务器。若要让所有yum作业都能使用代理主机服务器,请在/etc/yum. conf中指定代理主机服务器详细信息。
在/etc/yum.conf中添加如下条目,以使yum能够使用代理(此处为代理服务器:abc.mydomain.com,连接到端口8080)
代理服务器= http://abc.mydomain.com:8080