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

执行命令

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 编译 成功。

 

posted @ 2021-08-21 18:22  码农编程进阶笔记  阅读(443)  评论(0编辑  收藏  举报
返回顶部 有事您Q我