[Centos] rpm corruption
John Newbigin
jnewbigin at ict.swin.edu.au
Thu Apr 14 01:13:40 UTC 2005
My final script for anyone who might need it is:
#!/bin/bash
unset LANG
export LD_ASSUME_KERNEL=2.2.5
rpm -qa | wc --lines
rm -rf /var/lib/rpm/__db.00?
rpm --define '__dbi_rebuild nofsync !log !txn !cdb !thread' --rebuilddb
unset LD_ASSUME_KERNEL
rpm -qa | wc --lines
rpm --rebuilddb
rpm -qa | wc --lines
Note: Watch out for the ! characters.
John.
Johnny Hughes wrote:
> On Thu, 2005-04-14 at 09:50 +1000, John Newbigin wrote:
>
>>In answer to my own question, this is what I have done which appears to
>>fix the problem:
>>
>>1. Edit /usr/lib/rpm/macros and change the line
>>%__dbi_rebuild nofsync !log !txn !cdb
>>to
>>%__dbi_rebuild nofsync !log !txn !cdb !thread
>>2. export LD_ASSUME_KERNEL=2.2.5
>>3. rpm --rebuilddb
>>4. unset LD_ASSUME_KERNEL
>>5. Edit /usr/lib/rpm/macros back to the original
>>6. rpm --rebuilddb
>>
>>So far this fixes the problems I have been having. I assume it is
>>possible to override the macro setting on the rpm command line so no
>>editing is required and a simple script can be run on all my machines.
>>
>
> I use the --define switch to define rpm variables with rpmbuild ...
> don't know if it will work with RPM too, but it might. Here is an
> example:
>
> --define "_build i386-redhat-linux-gnu"
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
--
John Newbigin
Computer Systems Officer
Faculty of Information and Communication Technologies
Swinburne University of Technology
Melbourne, Australia
http://www.ict.swin.edu.au/staff/jnewbigin
More information about the CentOS
mailing list