lost and found ( for me ? )

Showing posts with label yum. Show all posts
Showing posts with label yum. Show all posts

Fedora 19: yum error: BDB0087 DB_RUNRECOVERY: Fatal error

small tips to how to fix the yum error.

# cat /etc/fedora-release ;uname -ri
Fedora release 19 (Schrödinger’s Cat)
3.11.3-201.fc19.x86_64 x86_64

# yum update -y
error: rpmdb: BDB0113 Thread/process 2917/140267983161152 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:

rebuild the rpm DB

# rpm -v --rebuilddb

# yum update -y
Loaded plugins: langpacks, refresh-packagekit
adobe-linux-x86_64                                       |  951 B     00:00     
fedora-virt-preview                                      | 2.9 kB     00:00     
google-chrome                                            |  951 B     00:00     
google-musicmanager                                      |  951 B     00:00     
updates/19/x86_64/metalink                               | 7.9 kB     00:00     
updates                                                  | 4.4 kB     00:00     
virtualbox                                               |  951 B     00:00     

Fedora 17 64bit : can’t update via yum ( the result is always “no packages marked for update” )

I have one desktop machine and one laptop machine and I have installed Fedora 17 64bit on both boxes.
Whenever I try to update packages with “yum update” on the desktop machine , the result is always “No Packages marked for Update”
I , however , can update packages with “yum update” on the laptop machine.


[root@f17-64 ~]# uname -ri
3.5.5-2.fc17.x86_64 x86_64
[root@f17-64 ~]# cat /etc/fedora-release
Fedora release 17 (Beefy Miracle)

[root@f17-64 ~]# yum update -y
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update

After issuing “yum clean all” , I can update packages.
[root@f17-64 ~]# yum clean all
Loaded plugins: langpacks, presto, refresh-packagekit
Cleaning repos: fedora google-chrome updates
Cleaning up Everything

[root@f17-64 ~]# yum update -y
<snip>
 vlgothic-p-fonts.noarch 0:20120928-1.fc17                                     
 wodim.x86_64 0:1.1.11-14.fc17                                                 
 xulrunner.x86_64 0:16.0.1-1.fc17                                              
 ykpers.x86_64 0:1.8.0-1.fc17                                                  
 zeitgeist.x86_64 0:0.9.5-1.fc17                                               
 zeitgeist-datahub.x86_64 0:0.9.5-1.fc17                                       

Complete!
[root@f17-64 ~]#

Seen from /var/log/yum.log , I can not update packages after Oct 12th.
[root@f17-64 ~]# egrep "Oct" /var/log/yum.log | awk '{print $1,$2}' | uniq | tail -2
Oct 12
Oct 18

It seems that there is any problem with yum-related data such as metadata , headers etc...

Fedora 16 64bit : yum : Error: failure: repodata/filelists.xml.gz from google-chrome: [Errno 256] No more mirrors to try



[root@fc16 ~]# cat /etc/redhat-release
Fedora release 16 (Verne)
[root@fc16 ~]# uname -ri
3.3.0-4.fc16.x86_64 x86_64

When issuing “yum update” , I see the following error.
[root@fc16 ~]# LANG=C yum update -y
http://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/filelists.xml.gz: [Errno 12] Timeout on http://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/filelists.xml.gz: (28, '')
Trying other mirror.
Error: failure: repodata/filelists.xml.gz from google-chrome: [Errno 256] No more mirrors to try.

It seems that this is yum issue.
I have installed Fedora 16 64bit on my desktop and Fedora 16 32bit on my laptop.
This error occurs on Fedora 16 64bit ver.
[root@fc16 ~]# LANG=C yum --version
3.4.3
 Installed: rpm-4.9.1.2-6.fc16.x86_64 at 2012-03-26 15:43
 Built    : Fedora Project at 2012-03-07 11:29
 Committed: Panu Matilainen <pmatilai@redhat.com> at 2012-03-07

 Installed: yum-3.4.3-7.fc16.noarch at 2012-02-21 14:08
 Built    : Fedora Project at 2011-12-09 19:06
 Committed: J??n ONDREJ (SAL) <ondrejj(at)salstar.sk> at 2011-12-09

To solve this :

issue “yum clean metadata”
[root@fc16 ~]# yum clean metadata
読み込んだプラグイン:langpacks, presto, refresh-packagekit
14 metadata files removed
4 sqlite files removed
0 metadata files removed

then issue “yum update” again.
[root@fc16 ~]# yum update -y
<snip>
 vlgothic-fonts-common.noarch 0:20120312-1.fc16                                
 vlgothic-p-fonts.noarch 0:20120312-1.fc16                                     
 yum.noarch 0:3.4.3-23.fc16                                                    

完了しました!
[root@fc16 ~]# echo $?
0
[root@fc16 ~]#

If you still see an error , please try the below.
# yum celan all
# yum clean metadata
# yum update -y

Scientific Linux 6.1 yum : choose the fastest mirrors


edit /etc/yum.repos.d/sl.repo file and comment out “mirrorlist=” lines.
# egrep mirrorlist /etc/yum.repos.d/sl.repo
mirrorlist=http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-6.txt
mirrorlist=http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-security-6.txt

install “yum –plugin-fastestmirror”
# yum install yum-plugin-fastestmirror –y

search for fastest mirrors.
# yum update –y
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
* sl: ftp.ne.jp
* sl-security: ftp.ne.jp
Setting up Update Process
No Packages marked for Update

In my case , the fastest mirrors are ftp.ne.jp.

yum: メディアからRPMsをインストールする方法

# cat /etc/redhat-release
CentOS release 5.4 (Final)

# uname -r
2.6.18-164.el5

# egrep -v "^#" /etc/yum.repos.d/CentOS-Media.repo

[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
        file:///media/cdrom/
        file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

/media/cdrom or /media/cdrecorder をみる。

# mkdir /media/cdrom

# mount -t iso9660 -o ro /dev/cdrom /media/cdrom


メディアと外部をみる場合。

# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c5-media [command]
#

メディアのみ。

# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c5-media [command]

]# yum --disablerepo=\* --enablerepo=c5-media list | head -10
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * c5-media:
Installed Packages
Deployment_Guide-ja-JP.noarch             5.2-11.el5.centos            installed
GConf2.i386                               2.14.0-9.el5                 installed
GConf2-devel.i386                         2.14.0-9.el5                 installed
MAKEDEV.i386                              3.23-1.2                     installed

依存関係もチェックして必要なパッケージをインストールしてくれる。

# yum --disablerepo=\* --enablerepo=c5-media install -y php-cli.i386
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * c5-media:
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-cli.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-common = 5.1.6-23.2.el5_3 for package: php-cli
--> Running transaction check
---> Package php-common.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Finished Dependency Resolution

Yum

Yumのレポジトリを編集しようとバックアップとったときのこと。

最後の拡張子が repo だと読み込んじゃうんだ。
言われてみればそうだけど気づかなかった。
いつもバックアップとるとき最初に org をつける癖が。。
前もなんかではまったことが。。
今度から最後に org をつけよう。。

最後に .org をつけると、それは読み込まない。

# cp CentOS-Base.repo CentOS-Base.repo.org

# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.iij.ad.jp
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Setting up Update Process
No Packages marked for Update
# cp CentOS-Base.repo org.CentOS-Base.repo

最後に repo があると読み込む。

# yum update
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* addons: ftp.iij.ad.jp
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Setting up Update Process
No Packages marked for Update
#

yum: kernel の削除

Fedora 使用していると、kernel のアップデートが頻繁にあるので、
古いカーネルを削除する方法。

# rpm -qa | grep kernel
kernel-PAE-devel-2.6.29.6-213.fc11.i686
kernel-firmware-2.6.29.6-213.fc11.noarch
kernel-PAE-2.6.29.5-191.fc11.i686
kerneloops-0.12-5.fc11.i586
kernel-PAE-devel-2.6.29.5-191.fc11.i686
kernel-headers-2.6.29.6-213.fc11.i586
kernel-PAE-2.6.29.6-213.fc11.i686

現在使用している kernel

[root@arizona ~]# uname -r
2.6.29.6-213.fc11.i686.PAE

191を削除。

[root@arizona ~]# yum remove -y kernel-PAE-2.6.29.5-191.fc11.i686 kernel-PAE-devel-2.6.29.5-191.fc11.i686

[root@arizona ~]# egrep -v "^#" /etc/grub.conf
default=1
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.29.6-213.fc11.i686.PAE)
root (hd0,2)
kernel /boot/vmlinuz-2.6.29.6-213.fc11.i686.PAE ro root=UUID=d32cec7c-94ac-481b-b3f8-1dc36daa59fe rhgb quiet
initrd /boot/initrd-2.6.29.6-213.fc11.i686.PAE.img
title WinXP
rootnoverify (hd0,0)
chainloader +1

grub.conf も編集してくれる。