今天在安装nginx的过程中遇到的一点问题记录:
环境是Centos 6.4
错误一:
yum install pcre pcre-devel 的时候出现反复错误如下:
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 153 M RSS (266 MB VSZ)
Started: Thu Jul 12 00:03:05 2012 - 06:17 ago
State : Sleeping, pid: 4018
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 153 M RSS (266 MB VSZ)
Started: Thu Jul 12 00:03:05 2012 - 06:19 ago
State : Sleeping, pid: 4018
经查找是因为yum.pid被锁了,然后rm -rf /var/run/yum.pid 来强行解除锁定后又出现如下错误:
错误二:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
在这种情况下我只能说法克鱿,于是继续编辑yum
按照网上方法,解决办法如下:
修改文件“/etc/yum.repos.d/epel.repo”, 将baseurl的注释取消, mirrorlist注释掉。
错误三:
随后又出现error:
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: mirrors.neusoft.edu.cn
* extras: mirror.lzu.edu.cn
* updates: mirrors.zju.edu.cn
epel | 4.3 kB 00:00
http://download.fedoraproject.org/pub/epel/6/x86_64/repodata/462a238ca381077b75cd839b7081f3c0fa8e554f49787b05ec600fce0b7de3cd-primary.sqlite.bz2: [Errno 14] problem making ssl connection
Trying other mirror.
http://download.fedoraproject.org/pub/epel/6/x86_64/repodata/462a238ca381077b75cd839b7081f3c0fa8e554f49787b05ec600fce0b7de3cd-primary.sqlite.bz2: [Errno 14] problem making ssl connection
Trying other mirror.
Error: failure: repodata/462a238ca381077b75cd839b7081f3c0fa8e554f49787b05ec600fce0b7de3cd-primary.sqlite.bz2 from epel: [Errno 256] No more mirrors to try.
我能说点什么好?
好像是fastestmirror不能使用,fastestmirror是yum的一个加速插件,可能是系统不支持或者缺少组建导致的。处理办法就是禁用这个插件,方法如下:
#vi /etc/yum/pluginconf.d/fastestmirror.conf
=======================================================================================
[main]
enabled=0 //把1改为0
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov,
修改以下配置文件
#vi /etc/yum.conf
=======================================================================================[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1 //将这个值改为0
installonly_limit=5
恢复正常!
转载于:https://blog.51cto.com/leonsecurity/1962199