PHP compile errors

While compiling PHP 7 with FPM for Apache 2.4.25 sometime we receive errors as such:


“checking for mysql_set_server_option in -lmysqlclient_r… no configure: error: wrong mysql library version or lib not found.”


Do this:

“yum provides \*/libmysqlclient_r\*
Loaded plugins: protectbase, security, ulninfo
mysql-community-libs-compat-5.7.18-1.el6.x86_64 : Shared compat libraries for MySQL 5.1.72 database client
: applications
Repo : installed
Matched from:
Filename : /usr/lib64/mysql/
Filename : /usr/lib64/mysql/”


Navigate to the said folder and make a symlink as .so

“cd /usr/lib64/mysql/

ln -s”


Now recompile PHP, this should take care of this error.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: