centos配置網絡時出現問題?今天在日常進行CentOS操作的時候,不知為何yum -y install xxx命令突然卡死不動,Ctrl C取消執行也無解,遂關閉SSH重新建立連接,然而再次重新執行yum -y install xxx命令時卻報如下錯誤:,我來為大家科普一下關于centos配置網絡時出現問題?以下内容希望對你有幫助!
今天在日常進行CentOS操作的時候,不知為何yum -y install xxx命令突然卡死不動,Ctrl C取消執行也無解,遂關閉SSH重新建立連接,然而再次重新執行yum -y install xxx命令時卻報如下錯誤:
...
root@localhost:~>yum -y install xxx
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 27970.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 43 M RSS (362 MB VSZ)
Started: Mon Jul 13 18:27:38 2020 - 03:46 ago
State : Uninterruptible, pid: 27970
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 43 M RSS (362 MB VSZ)
Started: Mon Jul 13 18:27:38 2020 - 03:48 ago
State : Uninterruptible, pid: 27970
...
初步判斷應該是進程号為27970的那個假死了,即使剛才SSH關閉了也并沒有殺掉他,遂幹脆利落的執行了kill -9 27970直接殺死,後再執行yum -y install xxx命令,結果又有報錯:
...
root@localhost:~>yum -y install xxx
error: rpmdb: BDB0113 Thread/process 27970/140274709284672 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
...
哦豁,涼了,rpmdb本地數據存儲文件炸了……不過好在有解決方法。
執行如下命令,清理YUM倉庫本地數據存儲文件:
mv /var/lib/rpm/__db* /tmp;
執行如下命令,清理yum緩存:
rpm --rebuilddb;
yum clean all
大功告成。
現在細想一下,yum當時有可能是因為網絡問題假死,可能再等等就好了,不過畢竟當時有點着急,以後得注意下。
,更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!