Centos php7 failed to install fileinfo

centos7 installs SmartWiki composer install prompts for missing extensions

using the environment installed by lnmp.org

reference https://www.htcp.net/3675.html also failed

install using pecl

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]-sharp ./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]-sharp
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

finally Please reinstall the libmagic distribution this error does not know how to solve

Apr.01,2021

https://codeshelper.com/q/10.


install file-devel
see http://php.net/manual/zh/ref.


http://php.net/manual/zh/ref.

< H1 > yum install file-devel < / H1 >

yum install file-devel

Menu