Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

on an ubuntu 12.04 i have upgraded to PHP 5.4 according to this tutorial But when i call php5 -v i get

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/' - /usr/lib/php5/20100525/ cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/' - /usr/lib/php5/20100525/ cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/' - /usr/lib/php5/20100525/ cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.4.0-3~lucid+4 (cli) (built: Mar 27 2012 08:55:12) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

how can i fix it without breaking more stuff? ;)

edit, when trying to install php5-mysql

sudo apt-get install php5-mysql

i get

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5-mysql : Depends: libmysqlclient16 (>= 5.1.21-1) but it is not installable
E: Unable to correct problems, you have held broken packages.
share|improve this question

migrated from Apr 25 '12 at 8:52

This question came from our site for professional and enthusiast programmers.

with the new installation the folder .so folder changes, yo need to reinstall these packages or re-build it. – ZiTAL Apr 23 '12 at 15:25
thanks, i edited my initial post. – Confidence Apr 23 '12 at 15:28
maybe there is no package from mysqli in the repositories for now, try using repos – ZiTAL Apr 23 '12 at 16:36

Installing newer PHP versions on Ubuntu machines that doesn't support them is not recommended.

If you really need, you should try installing the PHP and MySQL packages from DotDeb, which has all of the extensions built as well. Instructions on their website

If installation asks for newer versions of your libs, you can download them from and install them manually using dpkg -i packagename.deb.

Note that this can ruin your Ubuntu installation. Test this on a Virtual Machine or recoverable environment, never in production.

share|improve this answer
+1 For the hint on dotdeb. – hakre Apr 25 '12 at 8:43

Have you tried to restart your webserver?

sudo /etc/init.d/apache2 restart

Haven't used Ubuntu in a while but I believe that's it

and then after that try re installing the packages in question. The MySQL ones

share|improve this answer
yes, same error....and i cannot find those missing so files on my system, when running updatedb and locate – Confidence Apr 23 '12 at 15:31
php5 -v is from console not from apache – ZiTAL Apr 23 '12 at 16:37
i fixed it simply buy undoing the whole process and returning back to 5.3 – Confidence Apr 23 '12 at 17:17

Ubuntu 12.4 is still beta phase ( final beta ) as far as i know. Since libmysqlclient16 has been removed from Ubuntu 12.04 repos you will need to install it manually. Download packages: 32 bit version - 64 bit version -

and then install it with: sudo dpkg -i libmysqlclient16_5.1.58-1ubuntu5_XXX.deb Probably you will need to upgrade your mysql server to 5.1.58

share|improve this answer
That is the real solution! Thanks a lot... – K-Gun Sep 11 '12 at 7:30

I have this problem as well on Debian Testing/Wheezy. I have no idea why the extensions are being installed to /usr/lib/php5/20100525/, but it seems that's where they are. To fix it, open up your php.ini file wherever that may be (probably in /etc/php* or something) and modify/add the following line:

extension_dir = "/usr/lib/php5/20100525/"

Then restart your php5-fpm if you know how, or just reboot the machine and PHP should be working again.

share|improve this answer

This package is obsolete for Debian version 7. Then one option is to disable it.

  1. go to /etc/php5/conf.d/
  2. edit /etc/php5/conf.d/mhash.ini
  3. disble adding ; next line like that


This library is found in /usr/lib/pyshared/python2.7. I tried to link (ln) to this but is not worked because show a binary error.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.