安装php出现“/replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory ”的解决方法

问题:
Sorry, I cannot run apxs. Possible reasons follow:

  1. Perl is not installed
  2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
  3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /usr/local/apache/bin/apxs follows:
./configure: /usr/local/apache/bin/apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory
configure: error: Aborting

解决方法:
1.yum install perl perl-devel
2.vi /usr/local/apache2/bin/apxs
用#!/usr/bin/perl -w 替换 #!/replace/with/path/to/perl/interpreter -w

问题:
configure: error: xml2-config not found. Please check your libxml2 installation.
解决方法:
yum install libxml2
yum install libxml2-devel -y

问题:
configure: error: Cannot find MySQL header files under /usr/local/mysql.
解决方法:
yum install mysql-devel

问题:
configure: error: Cannot find libmysqlclient under /usr.
解决方法:
/usr/lib64/mysql/
ll 查看版本号
cp -rp /usr/lib64/mysql/libmysqlclient.so. 对应版本号 /usr/lib/libmysqlclient.so

你可能感兴趣的:(安装php出现“/replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory ”的解决方法)