记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里了,无需再需要添加扩展,damn
http://stackoverflow.com/questions/33347108/php-warning-php-startup-invalid-library-maybe-not-a-php-library-in-unknown-o
可以用 命令查看php已经支持了哪些扩展

./php -m

你可能感兴趣的:(记PHP安装报扩展无法加载的错误)