klboy 发表于 2018-5-12 09:48:19

lnmp1.5想配置多版本php,安装出错

用的./install.sh mphp


checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/lnmp1.5/src/php-7.2.5':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
make: *** No targets specified and no makefile found.Stop.
make: *** No targets specified and no makefile found.Stop.
make: *** No rule to make target `install'.Stop.
Copy new php configure file...
Modify php.ini......
Install ZendGuardLoader for PHP 7.2...
unavailable now.
Creating new php-fpm configure file...
Copy php-fpm init.d file...
cp: cannot stat ‘/lnmp1.5/src/php-7.2.5/sapi/fpm/init.d.php-fpm’: No such file or directory
chmod: cannot access ‘/etc/init.d/php-fpm7.2’: No such file or directory
Add php-fpm7.2 service at system startup...
error reading information on service php-fpm7.2: No such file or directory
error reading information on service php-fpm7.2: No such file or directory
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|            https://lnmp.org             |
+-------------------------------------------+
Starting LNMP...
Starting nginx...done
Starting mariadb (via systemctl):
Starting php-fpmdone
Failed to install php-7.2.5, you can download /root/install-mphp7.2.log from your server, and upload install-mphp7.2.log to LNMP Forum.

klboy 发表于 2018-5-12 10:01:15

原因找到了。
根据日志:error: C++ preprocessor "/lib/cpp" fails sanity check 找到问题解决方案

    问题的根源是缺少必要的C++库。如果是CentOS系统,运行,如下命令解决:
yum install glibc-headers

yum install gcc-c++

Ubuntu系统中,debian.运行命令:
apt-get install build-essential   

apt-get install g++

最后显示You have successfully install php-7.2.5

klboy 发表于 2018-5-12 10:06:39

最好用的lnmp一键包。没有之一

licess 发表于 2018-5-12 11:26:17

回复 2# 的帖子

这些基本包肯定是有的要不lnmp你也安装不上,可能你之前操作过删除这些包
页: [1]
查看完整版本: lnmp1.5想配置多版本php,安装出错