0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7.6でyumが「Failed to perform setup on example.jp」とお手紙が来た

Last updated at Posted at 2019-04-18

yum-cronさんからお手紙が来た

読まずに捨てた。
以下の通りの内容だった。

Yum: Failed to perform setup on example.jp

Plugins failed to initialize with the following error message:
Error: rpmdb open failed
001.png

なーんかrpmdbが壊れてるらしい。
OSはCentOS 7.6。

直す

なんで壊れたかはわからない。

ディスク容量の様子

console
[root@example ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda4        16G  2.9G   13G  19% /
devtmpfs        236M     0  236M   0% /dev
tmpfs           245M     0  245M   0% /dev/shm
tmpfs           245M   33M  213M  14% /run
tmpfs           245M     0  245M   0% /sys/fs/cgroup
/dev/vda2       497M  284M  214M  57% /boot
tmpfs            49M     0   49M   0% /run/user/1001
tmpfs            49M     0   49M   0% /run/user/1000

ディスク容量は十分。

とりあえずrpmdbを消す

console
[root@example ~]# ls -l /var/lib/rpm/__db*
-rw-r--r-- 1 root root  270336 Apr 18 16:15 /var/lib/rpm/__db.001
-rw-r--r-- 1 root root   81920 Apr 18 16:15 /var/lib/rpm/__db.002
-rw-r--r-- 1 root root 1318912 Apr 18 16:15 /var/lib/rpm/__db.003
[root@example ~]# rm -f /var/lib/rpm/__db*
[root@example ~]# ls -l /var/lib/rpm/__db*
ls: cannot access /var/lib/rpm/__db*: No such file or directory

これでもう大丈夫。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?