我最近从 mysql 5.5 切换到 mariadb 5.5,但是现在似乎 mysqli 的 php 扩展将无法加载。我收到以下错误:
PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so:符号 mysql_client_errors,版本 libmysqlclient_18 未在文件 libmysqlclient 中定义。 so.18 在第 0 行的 Unknown 中带有链接时间参考
我检查了我的 /usr/lib/mysql/ 并具有以下内容:
lrwxrwxrwx 1 root root 26 Jan 2 23:56 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
-rwxr-xr-x 1 root root 2140588 Dec 23 2010 libmysqlclient_r.so.16.0.0
lrwxrwxrwx 1 root root 24 Jan 2 23:56 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root 2146532 Dec 23 2010 libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root 24 Feb 4 03:00 libmysqlclient.so.18 -> libmysqlclient.so.18.0.0
lrwxrwxrwx 1 root root 29 Feb 4 01:25 libmysqlclient.so.18.0.0 -> /usr/lib/libmysqlclient.so.18
在 /usr/lib/
-rw-r--r-- 1 root root 3516274 Jan 29 17:50 libmysqlclient.a
lrwxrwxrwx 1 root root 16 Feb 4 03:50 libmysqlclient_r.a -> libmysqlclient.a
lrwxrwxrwx 1 root root 17 Feb 4 04:03 libmysqlclient_r.so -> libmysqlclient.so
lrwxrwxrwx 1 root root 26 Feb 4 03:00 libmysqlclient_r.so.15 -> libmysqlclient_r.so.15.0.0
-rwxr-xr-x 1 root root 1890068 Jan 29 17:49 libmysqlclient_r.so.15.0.0
lrwxrwxrwx 1 root root 26 Feb 4 03:00 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
-rwxr-xr-x 1 root root 2039444 Jan 29 17:49 libmysqlclient_r.so.16.0.0
lrwxrwxrwx 1 root root 17 Feb 4 04:03 libmysqlclient_r.so.18 -> libmysqlclient.so
lrwxrwxrwx 1 root root 17 Feb 4 04:03 libmysqlclient_r.so.18.0.0 -> libmysqlclient.so
lrwxrwxrwx 1 root root 20 Feb 4 04:03 libmysqlclient.so -> libmysqlclient.so.18
lrwxrwxrwx 1 root root 24 Feb 4 03:00 libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
-rwxr-xr-x 1 root root 1881264 Jan 29 17:49 libmysqlclient.so.15.0.0
lrwxrwxrwx 1 root root 24 Feb 4 03:00 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root 2029136 Jan 29 17:49 libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root 24 Feb 4 04:03 libmysqlclient.so.18 -> libmysqlclient.so.18.0.0
-rwxr-xr-x 1 root root 4572480 Jan 29 17:28 libmysqlclient.so.18.0.0
lrwxrwxrwx 1 root root 24 Feb 2 12:23 libmysqlclient.so.18.bak -> libmysqlclient.so.18.0.0
-rw-r--r-- 1 root root 17728804 Jan 29 17:50 libmysqld.a
lrwxrwxrwx 1 root root 15 Feb 4 03:00 libmysqld.so -> libmysqld.so.18
-rwxr-xr-x 1 root root 51104132 Jan 29 17:48 libmysqld.so.18
-rw-r--r-- 1 root root 5590 Jan 29 17:49 libmysqlservices.a
这是在 CentOS 6.3 上