1、configure: error: Cannot find OpenSSL's libraries
处理:
1)、ftp://ftp.openssl.org/source/下载最新openssl
2)、安装openssl
a. ./config --prefix=/opt/openssl
b. make
c. make install
3)、configure指定--with-openssl=/opt/openssl
2、configure: error: jpeglib.h not found.
处理:apt-get install libjpeg-dev
3、configure: error: png.h not found.
处理:apt-get install libpng12-dev
4、configure: error: xpm.h not found
处理:apt-get install libxpm-dev
5、configure: error: freetype-config not found
处理:apt-get install libfreetype6-dev
6、configure: error: mcrypt.h not found. Please reinstall libmcrypt
处理:apt-get install libmcrypt-dev
7、Makefile:747: recipe for target 'ext/fileinfo/libmagic/apprentice.lo' failed
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1【php安装make过程中】
处理:在./configure 后加上--disable-fileinfo
原因:内存小于1G
8、ext/zip/lib/zipint.h:118:2: error: #error unsupported size of off_t
#error unsupported size of off_t ^make: *** [ext/zip/lib/zip_add.lo] 错误 1
处理:apt-get install libzip-dev
9、gd/gd.c:1345: undefined reference to `XpmLibraryVersion`
collect2: error: ld returned 1 exit status
Makefile:264: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1
处理:
dpkg -S libXpm 查找libXpm的安装位置(当前为/usr/lib/x86_64-linux-gnu/)
在php ./configure 配置后添加--with-xpm-dir=/usr/lib/x86_64-linux-gnu/
10、src/core/ngx_regex.h:15:18: fatal error: pcre.h: No such file or directory
compilation terminated.
make[1]: *** [objs/src/core/nginx.o] Error 1
make[1]: Leaving directory `/root/opt/nginx-1.9.9'
make: *** [build] Error 2
处理:apt-get install libpcre3-dev
11、make[2]: Entering directory `/root/opt/pcre2-10.20'
make[2]: *** No rule to make target `libpcre.la'. Stop.
make[2]: Leaving directory `/root/opt/pcre2-10.20'
make[1]: *** [../pcre2-10.20/.libs/libpcre.a] Error 2
make[1]: Leaving directory `/root/opt/nginx-1.9.9'
make: *** [build] Error 2
处理:
1、find / -name libpcre.a // 查询libpcre.a文件的位置
2、创建.libs目录、复制相关文件
mkdir pcre2-10.20/.libs
cp /usr/lib/x86_64-linux-gnu/libpcre.a libpcre.a
cp /usr/lib/x86_64-linux-gnu/libpcre.a libpcre.la
cp /usr/lib/x86_64-linux-gnu/libpcre.a .libs/libpcre.la
cp /usr/lib/x86_64-linux-gnu/libpcre.a .libs/libpcre.a
原因:pcre2安装会报错
12、E: Sub-process /usr/bin/dpkg returned an error code (1)
处理:
cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info