centos7 源码编译安装php7,报错make: *** 没有指明目标并且找不到 makefile。 停止。「建议收藏」

centos7 源码编译安装php7,报错make: *** 没有指明目标并且找不到 makefile。 停止。

大家好,又见面了,我是全栈君。

首先,报错啥就去安装对应的扩展,就对了(这点很重要)!!!

在检测过程中如果检测到没有安装某个扩展他就自动停止了,你再 make && make install 时,就会报错。并不像网上说都是缺少gcc,具体看你缺少啥就安装啥扩展,

我的时先后报了两次错;

第一次,报错

checking for BZip2 support… yes

checking for BZip2 in default path… not found

configure: error: Please reinstall the BZip2 distribution

centos7 源码编译安装php7,报错make: *** 没有指明目标并且找不到 makefile。 停止。「建议收藏」

执行命令

yum install bzip2-devel.x86_64 -y

第二次,

configure: error: Please reinstall the libcurl distribution -
    easy.h should be in /include/curl/

执行如下命令

yum install curl curl-devel

接着执行 ./configure 命令

./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc  --enable-mbstring --with-libxml-dir=/usr --enable-soap --with-curl --with-zlib --with-gd --with-pdo-sqlite --with-pdo-mysql --with-mysqli --with-mysql-sock --enable-mysqlnd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --enable-ftp --with-kerberos --with-xmlrpc --with-fpm-user=www --disable-fileinfo

再次执行 make && make install 编译 成功。

centos7 源码编译安装php7,报错make: *** 没有指明目标并且找不到 makefile。 停止。「建议收藏」

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/111464.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号