使用本地YUM源安装服务报错以及解决办法
发布日期:2021-07-27 05:00:49 浏览次数:6 分类:技术文章

本文共 2705 字,大约阅读时间需要 9 分钟。

使用本地YUM源安装服务报错以及解决办法

YUM报错

Total                                                                                                                                                     35 MB/s |  18 MB  00:00:00     Running transaction checkRunning transaction testTransaction test succeededRunning transactionTraceback (most recent call last):  File "/usr/bin/yum", line 29, in 
yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 375, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 281, in main return_code = base.doTransaction() File "/usr/share/yum-cli/cli.py", line 816, in doTransaction resultobject = self.runTransaction(cb=cb) File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1833, in runTransaction lastdbv = self.history.last() File "/usr/lib/python2.7/site-packages/yum/history.py", line 1271, in last ret = self.old([], 1, complete_transactions_only) File "/usr/lib/python2.7/site-packages/yum/history.py", line 1220, in old executeSQL(cur, sql, params) File "/usr/lib/python2.7/site-packages/yum/sqlutils.py", line 166, in executeSQLQmark return cursor.execute(query)sqlite3.OperationalError: database is locked

解决办法

[root@node ~]# cd /var/lib/rpm/[root@node rpm]# lltotal 47744-rw-r--r--. 1 root root  1257472 Nov 10 09:51 Basenames-rw-r--r--. 1 root root     8192 Nov 10 09:51 Conflictname-rw-r--r--. 1 root root   286720 Nov 10 09:55 __db.001-rw-r--r--. 1 root root    90112 Nov 10 09:55 __db.002-rw-r--r--. 1 root root  1318912 Nov 10 09:55 __db.003-rw-r--r--. 1 root root   401408 Nov 10 09:51 Dirnames-rw-r--r--. 1 root root     8192 Nov 10 09:51 Group-rw-r--r--. 1 root root    12288 Nov 10 09:51 Installtid-rw-r--r--. 1 root root    24576 Nov 10 09:51 Name-rw-r--r--. 1 root root    16384 Nov 10 09:51 Obsoletename-rw-r--r--. 1 root root 43581440 Nov 10 09:51 Packages-rw-r--r--. 1 root root  1748992 Nov 10 09:51 Providename-rw-r--r--. 1 root root   135168 Nov 10 09:51 Requirename-rw-r--r--. 1 root root    40960 Nov 10 09:51 Sha1header-rw-r--r--. 1 root root    24576 Nov 10 09:51 Sigmd5-rw-r--r--. 1 root root     8192 Nov 10 09:51 Triggername[root@node rpm]# rm -i __db.*rm: remove regular file ‘__db.001’? yrm: remove regular file ‘__db.002’? yrm: remove regular file ‘__db.003’? y[root@node rpm]# [root@node rpm]# [root@node rpm]# yum clean allLoaded plugins: fastestmirrorCleaning repos: centos k8sCleaning up everythingMaybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed reposCleaning up list of fastest mirrors[root@node rpm]# yum history newLoaded plugins: fastestmirrorhistory new[root@node rpm]#

转载地址:https://blog.csdn.net/qq_45392321/article/details/109592849 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:[There are unfinished transactions remaining.]【使用本地YUM源安装服务报错解决方法】
下一篇:实战案例——Ansible部署高可用OpenStack平台

发表评论

最新留言

感谢大佬
[***.8.128.20]2024年09月22日 14时01分04秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章