今天在linux上面智障通常搞了很久,原本想安裝個swoole的,而後用 php -m 的命令想看下安裝的PHP擴展庫,發現有的擴展庫有的能夠出來,有的加載失敗,php
加載失敗的錯誤類型:mysql
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/memcached.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/memcached.so: undefined symbol: zend_new_interned_string in Unknown on line 0linux
以下:redis
[root@pys /]# php -m PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/memcached.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/memcached.so: undefined symbol: zend_new_interned_string in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/swoole.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/swoole.so: undefined symbol: zend_new_interned_string in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/redis.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/redis.so: undefined symbol: zend_new_interned_string in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/curl.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/curl.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/local/php7/lib/php/extensions/no-debug-non-zts-20151012/fileinfo.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/fileinfo.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/local/php7/lib/php/extensions/no-debug-non-zts-20151012/gd.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/gd.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/local/php7/lib/php/extensions/no-debug-non-zts-20151012/json.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/json.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/local/php7/lib/php/extensions/no-debug-non-zts-20151012/phar.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/phar.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/local/php7/lib/php/extensions/no-debug-non-zts-20151012/zip.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0 [PHP Modules] bz2 calendar Core ctype date ereg exif filter ftp gettext gmp
上面的意思是 :找不到擴展庫的路徑; 這是爲何尼?不是有的擴展庫也能夠出來嗎?sql
而後我是百度上找各類答案,並不能解決個人問題,最後本身發現問題所在:json
由於我並無爲全部的擴展庫加了快捷連接,覺得在哪裏只要用 php -m 的命令就能夠查看全部的擴展庫。swoole
實際上是要:/usr/local/php7/bin/php -m 這個命令才能夠,個人是PHP7.0版本的,其餘版本本身換下這個路徑就好。session
如此,就能夠看到全部的擴展庫了:php7
[root@pys bin]# /usr/local/php7/bin/php -m [PHP Modules] bcmath Core ctype curl date dom fileinfo filter ftp gd gettext hash iconv json libxml mbstring mcrypt memcached mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix redis Reflection session shmop SimpleXML soap sockets SPL sqlite3 standard swoole sysvsem tokenizer xml xmlreader xmlrpc xmlwriter zip zlib [Zend Modules]