1. 程式人生 > >yum過程出現的錯誤記錄

yum過程出現的錯誤記錄

linux

今天在安裝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,

facebook


修改以下配置文件

#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


恢復正常!

技術分享


本文出自 “Leon's Sky” 博客,請務必保留此出處http://leonsecurity.blog.51cto.com/3948452/1962199

yum過程出現的錯誤記錄