我无法使用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代理我已经添加了它。它以前就不在那里了。
发布于 2014-07-23 08:30:18
我从6.4开始就遇到了同样的问题,我仍然对没有一个容易找到的解决方案感到震惊。快速的解决办法是注释掉所有的镜像列表行,并取消注释所有的baseurl行,但根据一些论坛中的一些人的说法,这并不是一件好事。
发布于 2014-12-17 19:13:53
此问题可以通过修复您的网络设置来解决。IPv6镜像并不是在所有设置中都能工作。我使用Ansible做的事情是禁用IPv6,并使用谷歌的公共解析器。攻略假定SELinux已禁用。
---
- hosts: all
user: vagrant
sudo: True
tasks:
- name: "disable ipv6"
shell: echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
- name: "disable ipv6"
shell: echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
- name: "restart network"
service: name=network state=restarted
- name: "add public resolver"
lineinfile: dest=/etc/resolv.conf regexp='^nameserver'
line='nameserver 8.8.8.8' state=present
- name: "clean yum"
shell: yum clean all
- name: "warmup Yum"
shell: yum search libselinux-python
- name: "use Yum"
yum: name={{ item }} state=installed
with_items:
- libselinux-python
- name: "Enable SELinux"
selinux: policy=targeted state=permissive发布于 2016-12-29 20:11:07
如果您在/etc/yum.conf,中定义了一个代理服务器,那么在使用yum时,所有用户都会使用这些详细信息连接到代理服务器。要启用所有yum操作以使用代理服务器,请在/etc/yum.conf中指定代理服务器详细信息。
在/etc/yum.conf中添加如下条目,以使yum能够使用代理(这里的代理服务器: abc.mydomain.com,连接到端口8080)
proxy=http://abc.mydomain.com:8080
https://stackoverflow.com/questions/24861581
复制相似问题