1. 程式人生 > >記PHP安裝報擴充套件無法載入的錯誤

記PHP安裝報擴充套件無法載入的錯誤

我的編譯引數,已經包含了各個擴充套件

./configure --prefix=/opt/solio/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip

然後我檢視我的擴充套件目錄下沒有.so檔案,我以為編譯出了什麼問題,沒辦法又去一個個把擴充套件編譯一遍

cd {php-src}/ext/{extension}
{php-installed-path}/bin/phpize
./configure –with-{extension-name} –with-php-config={php-installed-path}/bin/php-config

啟動報錯

PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'bz2.so' in Unknown on line 0

網上搜了一圈

./php -m