warning: waiting for transaction lock on /var/lib/rpm/.rpm.lock
阿新 • • 發佈:2018-12-26
問題:執行安裝FTP時,報出
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
wget-1.12-5.el6_6.1.x86_64 is a duplicate with wget-1.12-1.8.el6.x86_64
的錯誤資訊。原因為系統中存在兩個版本的wget,產生兩個wget版本的原因可能是yum源更新的問題。所以這時想到的辦法就是重置yum源和更新yum源
執行過程如下:
[[email protected] ~]# yum install vsftpd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* atomic: mirrors.hosting.in.th
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package vsftpd.x86_64 0:2.2.2-14.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
vsftpd x86_64 2.2.2-14.el6 CentOS.6.base.x86_64 152 k
Transaction Summary
=========================================================================================
Install 1 Package(s)
Total download size: 152 k
Installed size: 332 k
Is this ok [y/N]: y
Downloading Packages:
vsftpd-2.2.2-14.el6.x86_64.rpm | 152 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
wget-1.12-5.el6_6.1.x86_64 is a duplicate with wget-1.12-1.8.el6.x86_64
解決辦法:
wget http://www.atomicorp.com/installers/atomic
sh ./atomic
執行到這裡時報錯如下:
Installing the Atomic GPG keys: OK
Downloading atomic-release-1.0-21.el6.art.noarch.rpm: warning: waiting for transaction lock on /var/lib/rpm/.rpm.lock
解決辦法:刪除/var/lib/rpm/.rpm.lock即可,之後重建正常。
rm -f /var/lib/rpm/.rpm.lock
rpm --rebuilddb
也可通過fuser /var/lib/rpm/.rpm.lock檢視佔用的程序,之後ps aux |grep processid找到對應程式,殺死即可。
[root@SZB-L0015013 ~]# yum check-update
更新完後就可以正常安裝了