force yum to reinstall a package +

I had to play recently with the pcre-6.6-2.el5_1.7.x86_64.rpm, on one of my CentOS 5.5 64bits test servers. By default, the RPM does not have the Unicode option enabled and I wanted to test some additional features in PHP. In few words, I needed to rebuild the RPM with the –enable-unicode-properties argument.

Luckily, it took me only 5 minutes to build the RPM, because I realized a little later it would be a lot easier to suppress the error message, directly into PHP (thanks Mike for opening my eyes).

So I had to revert everything to previous status. You have few options with CentOS. You could simply remove the data stored into database, then install the packages using the old school method:
# rpm -e --justdb --nodeps pcre pcre-devel
# yum install pcre.x86_64 pcre-devel.x86_64

For the record, –justdb will only update the installed lists in the rpmdb and not remove any files, while –nodeps will not process dependencies.

Or you could simply try the new school way:
# yum reinstall pcre.x86_64 pcre-devel.x86_64

For some reason, I always use the old method. I guess I like to type. :)

Related Entries

Leave a Reply