1. 程式人生 > 實用技巧 >yum install報錯:Another app is currently holding the yum lock

yum install報錯:Another app is currently holding the yum lock

在CentOS上yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxml* ncurses-devel* libmcrypt* libtool*時出現錯誤:

1)怎麼回事呢?根據提示,原來是系統程序已經有一個update在運行了。在程序裡檢視下:ps -ef | grep update

2)通過kill殺掉這個程序,可殺掉之後,錯誤依舊。原來在/var/run目錄下,還有yum這個程序ID,需要將這個程序id檔案強制刪除掉:

3)同時重啟下yum更新服務,如下:

4)最後重新yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxml* ncurses-devel* libmcrypt* libtool* ,已正常

轉載於:https://blog.51cto.com/300second/767194