It seems as though there are issues with corrupt MySQL rpm’s in CentOS 4. I do not think this is the case for every install; Because, I know personally this was the first time I have ever ran across this issue and, I have installed CentOS a number of times before without any such problem.

However, today while trying to install the MySQL library gem I ran into problems when it tried to compile the source.

[afro@putz src]# sudo gem install mysql
Select which gem to install for your platform (x86_64-linux)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. mysql 2.5.1 (ruby)
6. Cancel installation
> 3
Building native extensions. This could take a while...
*** extconf.rb failed ***

I was confused by this because everything seemed to be in working order. Initially I thought it might not be looking in the right place for the mysql library. I eventually gave up trying to include the correct location of the mysql libraries and, started to become weary of MySQL. Even though I was able to make a connection to the server; Something didn’t seem to be right.

I decided I would recompile PHP to see if it had any problems with the installed mysql rpm’s. Once everything was completed I was a little confused because, PHP didn’t seem to have a problem recognizing the lib’s.

Until, I received the most unusual error message:

[afro@putz src]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php4/mysql.so' - /usr/lib64/php4/mysql.so: undefined symbol: empty_string in Unknown on line 0 =: Unable to initialize
Module compiled with module API=20020429, debug=0, thread-safety
PHP 5.2.0 (cli) (built: Jan 14 2007 16:18:28)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies[afro@putz src]#

So, I figured something wasn’t right and, downloaded the mysql rpm’s from one of the CentOS mirrors. This is when I ran into another problem. Even though this one wasn’t so unusual but, as equally frustrating.

[afro@putz sql]# rpm -Uvh mysqlclient10-3.23.58-4.RHEL4.1.x86_64.rpm
Preparing...                ########################################### [100%]
package mysqlclient10-3.23.58-4.RHEL4.1 is already installed
file /usr/lib64/mysql/libmysqlclient.so.10.0.0 conflicts with mysqlclient10-3.23.58-4.RHEL4.1
[afro@putz sql]# rpm -e mysqlclient10-3.23.58-4.RHEL4.1
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
[afro@putz sql]# rpm -e mysqlclient10-3.23.58-4.RHEL4.1 && rpm -e mysqlclient10-3.23.58-4.RHEL4.1
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
[afro@putz sql]# rpm -e mysqlclient10-3.23.58-4.RHEL4.1 ; rpm -e mysqlclient10-3.23.58-4.RHEL4.1
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages

I have had this happen before and, every time it happens I will always forget what I did to fix the problem. So, I started looking around on Google and, finally found the solution.

[afro@putz sql]# rpm -e --nodeps --allmatches mysqlclient10-3.23.58-4.RHEL4.1
[afro@putz sql]#

So try using that command when rpm gives you multiple package errors.

 

Technorati Tags:

3 Comments

  1. Thank U

    • cwxwwwxwwxwx
    • Posted December 23, 2008 at 12:42 pm
    • Permalink

    well, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch ;)

    • Allan
    • Posted October 1, 2009 at 3:23 am
    • Permalink

    I am currently looking for the same answer on Google and got here.

    Many thanks,

    Al


Post a Comment

*
*