PDA

View Full Version : FC3: rpm version problem with yum



HippoMan
12th January 2005, 04:54 AM
I have just upgraded to FC3 from FC2, and I'm seeing an rpm problem with yum upgrade.

In summary, even though I'm using rpm-4.3.2, I'm getting an error during yum upgrade that says that I need to install rpm-4.0.4. This is confusing to me, given that I'm already using a much later version of rpm, and that is what prompted me to post this query.

And now, for the details.

Here's what happens:
# : Current version of rpm ...
# rpm --version
RPM version 4.3.2
# : Current version of yum ...
# yum --version
2.1.12
# : Do yum upgrade ...
# yum upgrade
Setting up Upgrade Process
Setting up Repo: base
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: updates-released
repomd.xml 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
base : ################################################## 2622/2622
updates-re: ################################################## 482/482
Excluding Packages in global exclude list
Finished
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package rpm.i386 0:4.3.2-21 set to be updated
--> Running transaction check

Dependencies Resolved
Transaction Listing:
Update: rpm.i386 0:4.3.2-21
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction

You have (unsupported)
/var/lib/rpm/packages.rpm db1 format installed package headers
Please install rpm-4.0.4 first, and do
rpm --rebuilddb
to convert your database from db1 to db3 format.

error: %pre(rpm-4.3.2-21.i386) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping rpm-4.3.2-21

Updated: rpm.i386 0:4.3.2-21
Complete!I don't understand why I would have to run the old 4.0.4 version of rpm in order to fix this problem. But if indeed I have to do that, I don't have a clue as to how to install that old version so that it works on my system, given that the current rpm version is 4.3.2.

So I guess my questions are these:

1. Do I really have to install rpm-4.0.4 in order to get this to work, or is this just an incorrect error message?
2. If rpm-4.0.4 is indeed needed, how do I install it without breaking my current rpm configuration?
3. If rpm-4.0.4 is not needed after all, then how do I fix this problem?

And I almost forgot: here's the contents of yum.conf concatenated with the contents of all the files in yum.repos.d ...
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=fedora-release
tolerant=1
exactarch=0
# Added this because some mirrors go down and then retying takes forever.
retries=1
timeout=10
# Avoid these for the moment
exclude=libcroco* libcrlayeng* libcrseleng* librsvg2*

[development]
name=Fedora Core $releasever - Development Tree
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide
enabled=0
[updates-testing]
name=Fedora Core $releasever - $basearch - Test Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/$basearch/
mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc$releasever
enabled=0
gpgcheck=1
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=1
gpgcheck=1
###################
## Fedora Extras ##
###################

# Temporarily set to FC2 because Fedora.US is not yet ready for FC3.

### DISABLED

[fedora-stable]
name=Fedora.us Extras (Stable)
baseurl=http://fedora.quicknet.nl/fedora/fedora/2/$basearch/RPMS.stable
http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora/2/$basearch/RPMS.stable
http://fedora.mirror.sdv.fr/fedora/fedora/$releasever/2/RPMS.stable
http://download.fedora.us/fedora/fedora/$releasever/2/RPMS.stable
enabled=0
#gpgcheck=1

[fedora-unstable]
name=Fedora.us Extras (Unstable)
baseurl=http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora/2/$basearch/RPMS.unstable
http://fedora.mirror.sdv.fr/fedora/fedora/2/$basearch/RPMS.unstable
http://fedora.quicknet.nl/fedora/fedora/2/$basearch/RPMS.unstable
http://mirrors.kernel.org/fedora.us/fedora/fedora/2/$basearch/RPMS.unstable
http://download.fedora.us/fedora/fedora/2/$basearch/RPMS.unstable
enabled=0
#gpgcheck=1

[fedora-testing]
name=Fedora.us Extras (Testing)
baseurl=http://download.fedora.us/fedora/fedora/2/$basearch/RPMS.testing
http://fedora.quicknet.nl/fedora/fedora/2/$basearch/RPMS.testing
http://fedora.mirror.sdv.fr/fedora/fedora/2/$basearch/RPMS.testing
http://mirrors.kernel.org/fedora.us/fedora/fedora/2/$basearch/RPMS.testing
http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora/2/$basearch/RPMS.testing
enabled=0
#gpgcheck=1

[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
Thank you very much in advance.

HippoMan
13th January 2005, 04:21 AM
P.S.
I want to add that I have googled and read every FAQ and discussion I could find, but I'm still at a loss as to why rpm-4.3.2 under FC3 is suggesting that I run the earlier rpm version 4.0.4. ... and if that's really necessary, how I can install and run it without messing up my current rpm configuration.

Of course, it's always possible that I missed one or more sources of information; if so, I humbly request a pointer to the pertinent docs.

cybrjackle
14th January 2005, 02:59 AM
You might try to do the following:



rm -rf /var/cache/yum/*
yum clean all
exactarch=1 <----Change that to one.
yum upgrade

HippoMan
14th January 2005, 12:42 PM
You might try to do the following:



rm -rf /var/cache/yum/*
yum clean all
exactarch=1 <----Change that to one.
yum upgrade
Thank you very much for your reply.

I did all of this, but I still got the same error message about rpm-4.0.4.

Also, I ran rpm --initdb followed by rpm --rebuilddb, and then
I re-ran the code that you suggested. But I got the same results.

It's looking like this is a problem with rpm and not yum.

Here's what happened each time with the yum upgrade step. Note the
rpm error near the end of this listing:


# yum upgrade
Setting up Upgrade Process
Setting up Repo: base
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: updates-released
repomd.xml 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 797 kB 00:06
MD Read : ################################################## 2623/2623
base : ################################################## 2622/2622
primary.xml.gz 100% |=========================| 217 kB 00:01
MD Read : ################################################## 495/495
updates-re: ################################################## 495/495
Excluding Packages in global exclude list
Finished
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for selinux-policy-targeted-sources to pack into transaction set.
selinux-policy-targeted-s 100% |=========================| 53 kB 00:00
---> Package selinux-policy-targeted-sources.noarch 0:1.17.30-2.72 set to be updated
---> Downloading header for w3m to pack into transaction set.
w3m-0.5.1-4.FC3.0.i386.rp 100% |=========================| 18 kB 00:00
---> Package w3m.i386 0:0.5.1-4.FC3.0 set to be updated
---> Downloading header for selinux-policy-targeted to pack into transaction set.
selinux-policy-targeted-1 100% |=========================| 22 kB 00:00
---> Package selinux-policy-targeted.noarch 0:1.17.30-2.72 set to be updated
---> Downloading header for vim-enhanced to pack into transaction set.
vim-enhanced-6.3.054-0.fc 100% |=========================| 6.1 kB 00:00
---> Package vim-enhanced.i386 1:6.3.054-0.fc3.1 set to be updated
---> Downloading header for vim-X11 to pack into transaction set.
vim-X11-6.3.054-0.fc3.1.i 100% |=========================| 6.9 kB 00:00
---> Package vim-X11.i386 1:6.3.054-0.fc3.1 set to be updated
---> Downloading header for system-config-samba to pack into transaction set.
system-config-samba-1.2.2 100% |=========================| 23 kB 00:00
---> Package system-config-samba.noarch 0:1.2.26-0.fc3.1 set to be updated
---> Downloading header for vim-common to pack into transaction set.
vim-common-6.3.054-0.fc3. 100% |=========================| 115 kB 00:00
---> Package vim-common.i386 1:6.3.054-0.fc3.1 set to be updated
---> Downloading header for vim-minimal to pack into transaction set.
vim-minimal-6.3.054-0.fc3 100% |=========================| 5.1 kB 00:00
---> Package vim-minimal.i386 1:6.3.054-0.fc3.1 set to be updated
---> Downloading header for w3m-img to pack into transaction set.
w3m-img-0.5.1-4.FC3.0.i38 100% |=========================| 11 kB 00:00
---> Package w3m-img.i386 0:0.5.1-4.FC3.0 set to be updated
---> Downloading header for rpm to pack into transaction set.
rpm-4.3.2-21.i386.rpm 100% |=========================| 29 kB 00:00
---> Package rpm.i386 0:4.3.2-21 set to be updated
--> Running transaction check

Dependencies Resolved
Transaction Listing:
Update: rpm.i386 0:4.3.2-21
Update: selinux-policy-targeted.noarch 0:1.17.30-2.72
Update: selinux-policy-targeted-sources.noarch 0:1.17.30-2.72
Update: system-config-samba.noarch 0:1.2.26-0.fc3.1
Update: vim-X11.i386 1:6.3.054-0.fc3.1
Update: vim-common.i386 1:6.3.054-0.fc3.1
Update: vim-enhanced.i386 1:6.3.054-0.fc3.1
Update: vim-minimal.i386 1:6.3.054-0.fc3.1
Update: w3m.i386 0:0.5.1-4.FC3.0
Update: w3m-img.i386 0:0.5.1-4.FC3.0
Is this ok [y/N]: y
Downloading Packages:
selinux-policy-targeted-s 100% |=========================| 157 kB 00:01
w3m-0.5.1-4.FC3.0.i386.rp 100% |=========================| 1.1 MB 00:06
selinux-policy-targeted-1 100% |=========================| 76 kB 00:00
vim-enhanced-6.3.054-0.fc 100% |=========================| 955 kB 00:05
vim-X11-6.3.054-0.fc3.1.i 100% |=========================| 1.0 MB 00:06
system-config-samba-1.2.2 100% |=========================| 197 kB 00:01
vim-common-6.3.054-0.fc3. 100% |=========================| 3.4 MB 00:21
vim-minimal-6.3.054-0.fc3 100% |=========================| 250 kB 00:01
w3m-img-0.5.1-4.FC3.0.i38 100% |=========================| 22 kB 00:00
rpm-4.3.2-21.i386.rpm 100% |=========================| 557 kB 00:04
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating: vim-common 100 % done 1/20
Updating: selinux-policy-targeted 100 % done 2/20
Updating: w3m 100 % done 3/20
Updating: selinux-policy-targeted-sources 100 % done 4/20
Updating: vim-enhanced 100 % done 5/20
Updating: vim-X11 100 % done 6/20
Updating: system-config-samba 100 % done 7/20
warning: /etc/vimrc created as /etc/vimrc.rpmnew
Updating: vim-minimal 100 % done 8/20
Updating: w3m-img 100 % done 9/20

You have (unsupported)
/var/lib/rpm/packages.rpm db1 format installed package headers
Please install rpm-4.0.4 first, and do
rpm --rebuilddb
to convert your database from db1 to db3 format.

error: %pre(rpm-4.3.2-21.i386) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping rpm-4.3.2-21
Completing update for selinux-policy-targeted-sources - 11/20
Completing update for w3m - 12/20
Completing update for selinux-policy-targeted - 13/20
Completing update for vim-enhanced - 14/20
Completing update for vim-X11 - 15/20
Completing update for system-config-samba - 16/20
Completing update for vim-common - 17/20
Completing update for vim-minimal - 18/20
Completing update for w3m-img - 19/20

Updated: rpm.i386 0:4.3.2-21 selinux-policy-targeted.noarch 0:1.17.30-2.72 selinux-policy-targeted-sources.noarch 0:1.17.30-2.72 system-config-samba.noarch 0:1.2.26-0.fc3.1 vim-X11.i386 1:6.3.054-0.fc3.1 vim-common.i386 1:6.3.054-0.fc3.1 vim-enhanced.i386 1:6.3.054-0.fc3.1 vim-minimal.i386 1:6.3.054-0.fc3.1 w3m.i386 0:0.5.1-4.FC3.0 w3m-img.i386 0:0.5.1-4.FC3.0
Complete!
#

HippoMan
14th January 2005, 02:36 PM
I finally solved the problem. Here's what I did:


mv -f /var/lib/rpm/packages.rpm /var/lib/rpm/packages.rpm.old
rpm --initdb
rpm --rebuilddb
rm -rf /var/cache/yum/*
yum -y clean all
yum -y upgradeThe output from the final yum upgrade step now
looks like this:


Cleaning up Everything
0 headers removed
0 packages removed
0 metadata files removed
0 cache files removed
Setting up Upgrade Process
Setting up Repo: base
Setting up Repo: updates-released
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for rpm to pack into transaction set.
---> Package rpm.i386 0:4.3.2-21 set to be updated
--> Running transaction check

Dependencies Resolved
Transaction Listing:
Update: rpm.i386 0:4.3.2-21
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Completing update for rpm - 2/2

Updated: rpm.i386 0:4.3.2-21
Complete!