I received the below error when attempting to compile PHP to use with Litespeed as an LSAPI module. The error was related to multiple versions of numerous MySQL RPM packages being installed.
PHP Compile Error:
checking for MySQL support… yes
checking for specified location of the MySQL UNIX socket… no
checking for MySQL UNIX socket location… /var/lib/mysql/mysql.sock
checking for mysql_close in -lmysqlclient… no
checking for mysql_errno in -lmysqlclient… no
The PHP configure script was getting confused because of two 32-bit MySQL RPM packages being installed. If you look below this is the MySQL packages yum was showing installed on the server.
Command:
yum list *MYSQL*
Output:
Installed Packages
mysql.x86_64 5.0.45-7.el5 installed
mysql.i386 5.0.45-7.el5 installed
mysql-devel.x86_64 5.0.45-7.el5 installed
mysql-devel.i386 5.0.45-7.el5 installed
mysql-server.x86_64 5.0.45-7.el5 installed
perl-DBD-mysql.x86_64 4.010-1.el5.rf installed
php-mysql.x86_64 5.1.6-20.el5_2.1 installed
So what needed to be done is removing the i386 or 32-bit packages so the compiler would not be confused anymore. Issue the below command to remove the two 32-bit packages and proceed to compile PHP again.
Command:
yum remove mysql-i386
Command Result:
[root@server php-5.2.8]# yum remove mysql.i386
Loading “fastestmirror” plugin
Setting up Remove Process
Loading mirror speeds from cached hostfile
* dag: apt.sw.be
* pgdg83: yum.pgsqlrpms.org
* rpmforge: fr2.rpmfind.net
* base: mirror.fdcservers.net
* updates: pubmirrors.reflected.net
* addons: mirror.anl.gov
* ruby: repo.premiumhelp.eu
* extras: pubmirrors.reflected.net
Resolving Dependencies
–> Running transaction check
—> Package mysql.i386 0:5.0.45-7.el5 set to be erased
–> Processing Dependency: libmysqlclient.so.15 for package: mysql-devel
–> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-devel
–> Running transaction check
—> Package mysql-devel.i386 0:5.0.45-7.el5 set to be erased
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
mysql i386 5.0.45-7.el5 installed 7.3 M
Removing for dependencies:
mysql-devel i386 5.0.45-7.el5 installed 5.6 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 2 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : mysql-devel ######################### [1/2]
Erasing : mysql ######################### [2/2]
Removed: mysql.i386 0:5.0.45-7.el5
Dependency Removed: mysql-devel.i386 0:5.0.45-7.el5
Complete!
That was actually my problem, thanks!!!!!!!!
Hello Fernando Jimenez,
Great to hear! Thanks for taking the time to leave feedback.
Thanks.
alex
Thanks, this is very helpful!
Hello dima,
No problem. Thanks for taking the time to leave feedback!
Thanks.
alex