因为文件信息从 PECL 移动到 PHP。通过 WHM 或 putty 安装它的最佳方法是什么?
我尝试了以下命令:
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
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module
ERROR: `phpize' failed
最佳答案
此扩展自 PHP 5.3.0 起默认启用。在此之前,fileinfo 是一个 PECL 扩展,但不再在那里维护。但是,5.3+ 之前的版本可能会使用 » discontinued PECL extension .
引用:
http://www.php.net/manual/en/fileinfo.installation.php
ERROR: `phpize' failed
出现这个错误是因为你没有安装php-devel
包
关于php - 安装 fileinfo php 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10189266/