解決 yum clean all Error rpmdb open failed
本文件根據 rpmdb open failed 報錯提供解決方案。 |
報錯
# 用 yum 安裝軟體時程式被終止,執行 yum clean all 操作報 rpmdb open failed 錯誤 [root@localhost ~]# yum clean all Error: rpmdb open failed
解決方法
[root@localhost ~]# cd /var/lib/rpm [root@localhost rpm]# ll total 97412 -rw-r--r--. 1 root root 1839104 Jul 11 06:45 Basenames -rw-r--r--. 1 root root 8192 Jul 11 06:41 Conflictname -rw-r--r--. 1 root root 270336 Jul 11 06:48 __db.001 -rw-r--r--. 1 root root 81920 Jul 11 06:48 __db.002 -rw-r--r--. 1 root root 1318912 Jul 11 06:48 __db.003 -rw-r--r--. 1 root root 606208 Jul 11 06:45 Dirnames -rw-r--r--. 1 root root 16384 Jul 11 06:45 Group -rw-r--r--. 1 root root 12288 Jul 11 06:45 Installtid -rw-r--r--. 1 root root 28672 Jul 11 06:45 Name -rw-r--r--. 1 root root 16384 Jul 11 06:41 Obsoletename -rw-r--r--. 1 root root 93446144 Jul 11 06:45 Packages -rw-r--r--. 1 root root 1957888 Jul 11 06:45 Providename -rw-r--r--. 1 root root 180224 Jul 11 06:45 Requirename -rw-r--r--. 1 root root 49152 Jul 11 06:45 Sha1header -rw-r--r--. 1 root root 32768 Jul 11 06:45 Sigmd5 -rw-r--r--. 1 root root 8192 Jul 11 06:41 Triggername [root@localhost rpm]# rm -rf __db.* # 清除原 rpmdb 檔案 [root@localhost rpm]# rpm --rebuilddb # 重建 rpm 資料庫 [root@localhost rpm]# yum clean all # 清除所有 yum 快取
如果以上方法未能解決問題,請按照下面的方法再繼續操作:
# 檢查 yum 源配置檔案 [root@localhost rpm]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# ll total 40 -rw-r--r--. 1 root root 1664 Nov 23 2018 CentOS-Base.repo -rw-r--r--. 1 root root 1309 Nov 23 2018 CentOS-CR.repo -rw-r--r--. 1 root root 649 Nov 23 2018 CentOS-Debuginfo.repo -rw-r--r--. 1 root root 314 Nov 23 2018 CentOS-fasttrack.repo -rw-r--r--. 1 root root 630 Nov 23 2018 CentOS-Media.repo -rw-r--r--. 1 root root 1331 Nov 23 2018 CentOS-Sources.repo -rw-r--r--. 1 root root 5701 Nov 23 2018 CentOS-Vault.repo -rw-r--r--. 1 root root 951 Oct 2 2017 epel.repo -rw-r--r--. 1 root root 1050 Oct 2 2017 epel-testing.repo # 更新 yum 源 [root@localhost yum.repos.d]# yum update -y --skip-broken # 清除所有 yum 快取 [root@localhost yum.repos.d]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base epel extras updates Cleaning up list of fastest mirrors # 重建 yum 快取 [root@localhost yum.repos.d]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors epel/x86_64/metalink | 7.1 kB 00:00:00 * base: mirrors.cn99.com * epel: mirror01.idc.hinet.net * extras: mirrors.cn99.com * updates: mirrors.cn99.com base | 3.6 kB 00:00:00 epel | 5.3 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/19): base/7/x86_64/group_gz | 166 kB 00:00:00 (2/19): epel/x86_64/group_gz | 88 kB 00:00:01 (3/19): base/7/x86_64/other_db | 2.6 MB 00:00:09 (4/19): base/7/x86_64/filelists_db | 7.1 MB 00:00:48 (5/19): base/7/x86_64/primary_db | 6.0 MB 00:00:48 (6/19): epel/x86_64/filelists_db | 11 MB 00:01:03 (7/19): epel/x86_64/updateinfo | 991 kB 00:00:03 (8/19): epel/x86_64/prestodelta | 746 B 00:00:00 (9/19): epel/x86_64/primary_db | 6.7 MB 00:00:14 (10/19): epel/x86_64/other_db | 3.2 MB 00:00:03 (11/19): extras/7/x86_64/prestodelta | 65 kB 00:00:00 (12/19): extras/7/x86_64/filelists_db | 246 kB 00:00:01 (13/19): extras/7/x86_64/primary_db | 205 kB 00:00:01 (14/19): epel/x86_64/updateinfo_zck | 1.4 MB 00:00:01 (15/19): updates/7/x86_64/other_db | 659 kB 00:00:04 (16/19): updates/7/x86_64/prestodelta | 829 kB 00:00:06 (17/19): updates/7/x86_64/filelists_db | 4.6 MB 00:00:10 extras/7/x86_64/other_db FAILED | 48 MB 00:00:30 ETA [Errno 14] HTTP Error 302 - Found Trying other mirror. (18/19): extras/7/x86_64/other_db | 127 kB 00:00:01 (19/19): updates/7/x86_64/primary_db | 6.5 MB 00:00:38 Metadata Cache Created
測試
[root@localhost yum.repos.d]# yum install -y wget Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.cn99.com * epel: mirror01.idc.hinet.net * extras: mirrors.cn99.com * updates: mirrors.cn99.com Resolving Dependencies --> Running transaction check ---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================= Package Arch Version Repository Size ======================================================================================================= Installing: wget x86_64 1.14-18.el7_6.1 updates 547 k Transaction Summary ======================================================================================================= Install 1 Package Total download size: 547 k Installed size: 2.0 M Downloading packages: wget-1.14-18.el7_6.1.x86_64.rpm | 547 kB 00:00:09 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : wget-1.14-18.el7_6.1.x86_64 1/1 Verifying : wget-1.14-18.el7_6.1.x86_64 1/1 Installed: wget.x86_64 0:1.14-18.el7_6.1 Complete! # 已成功解決 Error: rpmdb open failed
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31559985/viewspace-2652636/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- smplx 的 libGL error: MESA-LOADER: failed to open swrast 的解決方法ErrorAIAST
- 【已解決】yum更新失敗:rpmdb: BDB0113 Thread/process 2673/140126198814528 failed: BDB1507 Thread died...threadAI
- Warning: RPMDB altered outside of yumIDE
- ascp: Failed to open TCP connection for SSH, exiting. Session Stop (Error: Failed to open TCP connection for SSH)AITCPSessionError
- nginx: [error] open() “/var/run/nginx/nginx.pid“ failed (2: No such file or directory)NginxErrorAI
- RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED解決辦法ErrorDNNAI
- ubuntu下pig報錯ERROR 2999: Unexpected internal error. Failed to create DataStorage的解決UbuntuErrorAIAST
- Cargo invocation has failed: Error: exit code: 101.解決辦法CargoAIError
- 解決windows下WslRegisterDistribution failed with error: 0x80070050的問題WindowsAIError
- Navicat tnt版本提示“failed to save password error code”的解決辦法AIError
- FreeBSD系統下zfs: failed with error 6錯誤的解決方法AIError
- 解決Error Initialization failed for ‘https://start.spring.io‘Please check URL, nErrorAIHTTPSpring
- 【ERROR】OPatch failed with error code 73ErrorAI
- 記錄:yum Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error解決CloudError
- yum error - package is a duplicate withErrorPackage
- preg_match_all (): Compilation failed:AI
- Job for mysqld.service failed because the control process exited with error code錯誤解決MySqlAIError
- git push出現unpack failed: error Missing tree錯誤的解決方法GitAIError
- 解決:Failed to load ApplicationContextAIAPPContext
- OPatch failed with error code 73AIError
- 解決 React-Native mac10.14.4 執行報錯 error Failed to build iOS projectReactMacErrorAIUIiOSProject
- 從根本解決windows安裝JDK出現error:could not open ‘...jvm.cfg‘的問題WindowsJDKErrorJVM
- 解決:Failed to download metadata for repo ‘base‘AI
- Error: Connection activation failed: Device not managed by NetworkManagerErrorAIdev
- 【AndroidStudio】Error:Execution failed for task ':app:preDebugAndroidTestBuild'.AndroidErrorAIAPPUI
- Ubuntu:make: Nothing to be done for `all' 解決方法Ubuntu
- Centos8.x yum 源配置 解決 yum 不可用CentOS
- Clean架構能夠解決哪些問題? - jbogard架構
- Failed to load AppCompat ActionBar with unknown error.--AS遇到檢視控制元件不顯示的解決方法AIAPPError控制元件
- NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load xxxx錯誤解決方法ErrorAIXMLHTTP
- 解決yum [Errno 256] No more mirrors to try
- Error creating bean with name 解決ErrorBean
- 【已解決】Error filter ListenerStartErrorFilter
- python -- 解決字典【KEY ERROR】PythonError
- 解決“su: cannot open session: Permission denied”Session
- Failed to execute aapt的奇怪解決方法AIAPT
- 小知識:CentOS配置yum源/解決yum源失效問題CentOS
- 解決yarn打包時出現“FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory”的問題YarnErrorMITAIJavaScript