为了账号安全,请及时绑定邮箱和手机立即绑定

centos php7 安装 fileinfo 失败

centos php7 安装 fileinfo 失败

PHP
红颜莎娜 2019-03-10 21:03:19
centos7 使用 lnmp.org 安装的环境 安装SmartWiki composer install 提示缺少扩展 参考 https://www.htcp.net/3675.html 也失败了 使用pecl 安装 [root@VM_0_14_centos Fileinfo-1.0.4]# pecl install fileinfo WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/filein fo/in php sources" WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-upd ate 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/php/bin/phpize' in the top level source direc tory of the module ERROR: `phpize' failed [root@VM_0_14_centos Fileinfo-1.0.4]#cd /tmp/pear/download/Fileinfo-1.0.4 [root@VM_0_14_centos Fileinfo-1.0.4]# /usr/local/php/bin/phpize Configuring for: PHP Api Version: 20160303 Zend Module Api No: 20160303 Zend Extension Api No: 320160303 [root@VM_0_14_centos Fileinfo-1.0.4]# ./configure --with-php-config=/usr/local/ php/bin/php-config checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr/local/php checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/inclu de/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-deb ug-non-zts-20160303 checking for PHP installed headers prefix... /usr/local/php/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking for fileinfo support... yes, shared checking for magic files in default path... not found configure: error: Please reinstall the libmagic distribution 参考You will need re2c 0.13.4 or later wget https://sourceforge.net/projects/re2c/files/0.16/re2c-0.16.tar.gz tar zxf re2c-0.16.tar.gz && cd re2c-0.16 ./configure make && make install [root@VM_0_14_centos Fileinfo-1.0.4]# ./configure --with-php-config=/usr/local/ php/bin/php-config 20160303 checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... ccFileinfo-1.0.4]# checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr/local/php checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/inclu de/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-deb ug-non-zts-20160303 checking for PHP installed headers prefix... /usr/local/php/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 0.16 (ok) checking for gawk... gawk checking for fileinfo support... yes, shared checking for magic files in default path... not found configure: error: Please reinstall the libmagic distribution 最后 Please reinstall the libmagic distribution 这个错误不知道怎么解决
查看完整描述

4 回答

?
一只萌萌小番薯

TA贡献1795条经验 获得超7个赞

yum install file-devel

查看完整回答
反对 回复 2019-03-18
  • 4 回答
  • 0 关注
  • 1819 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信