在linux下安裝fileinfo擴充時,出現如下錯誤提示,是什麼個意思(百度過了,找不到答案)
[root@AY130324201613791bca Fileinfo-1.0.4]# pecl install fileinfo
WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/fileinfo/in php sources"
WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-update pear.php.net" to update
downloading Fileinfo-1.0.4.tgz ...
Starting to download Fileinfo-1.0.4.tgz (5,835 bytes)
.....done: 5,835 bytes
3 source files, building
WARNING: php_bin /alidata/server/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Cannot find config.m4.
Make sure that you run '/alidata/server/php/bin/phpize' in the top level source directory of the module
ERROR: `phpize' failed
主要是這句
Make sure that you run '/alidata/server/php/bin/phpize' in the top level source directory of the module
回複內容:
在linux下安裝fileinfo擴充時,出現如下錯誤提示,是什麼個意思(百度過了,找不到答案)
[root@AY130324201613791bca Fileinfo-1.0.4]# pecl install fileinfo
WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/fileinfo/in php sources"
WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-update pear.php.net" to update
downloading Fileinfo-1.0.4.tgz ...
Starting to download Fileinfo-1.0.4.tgz (5,835 bytes)
.....done: 5,835 bytes
3 source files, building
WARNING: php_bin /alidata/server/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Cannot find config.m4.
Make sure that you run '/alidata/server/php/bin/phpize' in the top level source directory of the module
ERROR: `phpize' failed
主要是這句
Make sure that you run '/alidata/server/php/bin/phpize' in the top level source directory of the module
不知為何你pecl程式沒有找到phpize路徑
那麼試試手動安裝:
1.先看下phpize路徑在哪裡which phpize
(這裡假設在\use\bin\phpize)
2.去挑你需要Fileinfo擴充的版本(這個是最新版本 wget http://pecl.php.net/get/Fileinfo-1.0.4.tgz
)
3.tar -xvf Fileinfo-1.0.4.tgz && cd Fileinfo-1.0.4 && \use\bin\phpize
4.最後按照提示添加Fileinfo擴充絕對路徑到php.ini中
5.php -m 看下有沒載入擴充了