在Ubuntu的12.04我已经升级到PHP 5.4根据这个教程http://www.upubuntu.com/2012/03/how-to-upgrade-install-php-540-under.html但是当我打电话php5 -v我明白了
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/mysql.so' - /usr/lib/php5/20100525/mysql.so: 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/mysqli.so' - /usr/lib/php5/20100525/mysqli.so: 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/pdo_mysql.so' - /usr/lib/php5/20100525/pdo_mysql.so: 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
我怎样才能解决它而不破坏更多的东西? ;)
编辑,当试图安装php5-mysql
sudo apt-get install php5-mysql
我明白了
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.
不build议在不支持它们的Ubuntu机器上安装较新的PHP版本。
如果你真的需要,你应该尝试从DotDeb安装PHP和MySQL包,它也包含所有的扩展。 他们的网站上的说明http://www.dotdeb.org/instructions/
如果安装要求更新版本的libs,可以从http://packages.debian.org下载,使用dpkg -i packagename.deb手动安装。
请注意,这可能会毁了你的Ubuntu安装。 在虚拟机或可恢复环境中进行testing,从不进行生产。
你有没有尝试重新启动你的networking服务器?
sudo /etc/init.d/apache2 restart
有一段时间没有使用Ubuntu,但我相信是这样的
然后尝试重新安装有问题的软件包。 MySQL的
就我所知,Ubuntu 12.4仍然是testing阶段(最终testing版)。 由于libmysqlclient16已从Ubuntu 12.04仓库中删除,因此您需要手动安装。 下载软件包:32位版本 – http://launchpadlibrarian.net/94563300/libmysqlclient16_5.1.58-1ubuntu5_i386.deb 64位版本 – http://launchpadlibrarian.net/94808408/libmysqlclient16_5.1.58-1ubuntu5_amd64.deb
然后安装它:sudo dpkg -i libmysqlclient16_5.1.58-1ubuntu5_XXX.deb可能您将需要升级您的MySQL服务器到5.1.58
Debian Testing / Wheezy也有这个问题。 我不知道为什么扩展正在安装到/ usr / lib / php5 / 20100525 /,但似乎这是他们在哪里。 要解决这个问题,打开你的php.ini文件(可能在/ etc / php *之类的地方),并修改/添加下面一行:
extension_dir = "/usr/lib/php5/20100525/"
然后重新启动你的php5-fpm,如果你知道如何,或者重新启动机器,PHP应该再次工作。
这个软件包已经过时了Debian版本7.然后一个选项是禁用它。
/etc/php5/conf.d/ /etc/php5/conf.d/mhash.ini disble添加; 下一行就是这样
;extension=mhash.so
这个库位于/usr/lib/pyshared/python2.7 。 我试图链接( ln )到这个,但没有工作,因为显示一个二进制错误。