在Linux上进行PHP安装configure错误小结

PHP 安装,从官网下载源码压缩包,进行 configure 遇到几个错误:

configure 命令

./configure –prefix=/usr/local/php –with-config-file-path=/usr/local/php/etc –with-bz2 –with-curl –enable-ftp –enable-sockets –disable-ipv6 –with-gd –with-jpeg-dir=/usr/local –with-png-dir=/usr/local –with-freetype-dir=/usr/local –enable-gd-native-ttf –with-iconv-dir=/usr/local –enable-mbstring –enable-calendar –with-gettext –with-libxml-dir=/usr/local –with-zlib –with-pdo-mysql=mysqlnd –with-mysqli=mysqlnd –with-mysql=mysqlnd –enable-dom –enable-xml –with-libdir=lib64 –enable-pdo –enable-fpm

BZip2 错误

configure: error: Please reinstall the BZip2 distribution

解决方案

yum install bzip2
yum install bzip2-devel

bzip2 可能已经安装过,bzip2-devel 没有安装

libcurl 错误

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

解决方案

yum install curl-devel

GD 库错误

configure: error: jpeglib.h not found

解决方案

yum install libjpeg
yum -y install libjpeg-devel

libjpeg 可能已经安装过,libjpeg-devel 没有安装

发表回复

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