濮阳杆衣贸易有限公司

主頁 > 知識庫 > linux中yum update被占用(Another app is currently holding the yum lock)的解決辦法

linux中yum update被占用(Another app is currently holding the yum lock)的解決辦法

熱門標(biāo)簽:公司400電話辦理價格 依蘭縣地圖標(biāo)注app 琿春市地圖標(biāo)注app 潮州地圖標(biāo)注 百度中國地圖標(biāo)注中心 pageadm實現(xiàn)地圖標(biāo)注 山東企業(yè)電銷機器人價格 百度地圖標(biāo)注開鎖電話 安陽百應(yīng)電銷機器人加盟

使用yum安裝計劃任務(wù)功能,結(jié)果提示:


復(fù)制代碼
代碼如下:

# yum -y install vixie-cron
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid font color="#ff0000">25960/font>.
Another app is currently holding the yum lock; waiting for it to exit...


可能是系統(tǒng)自動升級正在運行,yum在鎖定狀態(tài)中。
已經(jīng)有一個yum進程在運行了,使用kill干掉它:


復(fù)制代碼
代碼如下:

# kill -s 9 25960
# ps aux|grep yum
root 6744 0.0 0.0 103260 900 pts/1 S+ 14:59 0:00 grep yum
root 25960 0.0 0.0 0 0 ? Z Sep19 0:01 [yumBackend.py] defunct>


很遺憾,kill對付不了它,那怎么辦呢?

可以通過強制關(guān)掉yum進程:

#rm -f /var/run/yum.pid

然后就可以使用yum了。如果不行可以重啟yum

/sbin/service yum-updatesd restart

以下是其它網(wǎng)友的補充:

補充一、

有時,在linux下yum update會提示:

Another app is currently holding the yum lock解決方案

解決辦法是干掉緩存中的yum進程,重啟yum。

清掉緩存中的進程:

rm -f /var/run/yum.pid

重啟yum(我的系統(tǒng)是fedora)

systemctl status yum-updatesd.service

centos用戶使用:

/sbin/service yum-updatesd restart

補充二、

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

 

1)怎么回事呢?根據(jù)提示,原來是系統(tǒng)進程已經(jīng)有一個update在運行了。在進程里查看下:ps -ef | grep update



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

 

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



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



以上就是腳本之家小編的整理了,希望大家多支持腳本之家網(wǎng)站。

標(biāo)簽:林芝 常德 公主嶺 連云港 呼和浩特 晉中 三明 香港

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《linux中yum update被占用(Another app is currently holding the yum lock)的解決辦法》,本文關(guān)鍵詞  linux,中,yum,update,被,占用,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《linux中yum update被占用(Another app is currently holding the yum lock)的解決辦法》相關(guān)的同類信息!
  • 本頁收集關(guān)于linux中yum update被占用(Another app is currently holding the yum lock)的解決辦法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    建阳市| 尉氏县| 霍城县| 大港区| 淮安市| 宁都县| 汕头市| 永春县| 麻城市| 延津县| 奉贤区| 金塔县| 宁乡县| 武功县| 临安市| 水富县| 九台市| 文水县| 连平县| 彝良县| 屏南县| 新乐市| 米脂县| 教育| 辽阳市| 苗栗县| 湟源县| 孝感市| 临泉县| 泰兴市| 平度市| 龙岩市| 井研县| 永和县| 兴山县| 黎平县| 松溪县| 甘肃省| 南宁市| 新绛县| 平安县|