LINUX下编译安装PHP各种报错大集合
本文为大家整理汇总了一些linux下编译安装php各种报错大集合 ,感兴趣的同学参考下。
nginx1.6.2-mysql5.5.32二进制,php安装报错解决:
1
2 3 4 5 6 |
[root@client php-5.3.27]#make
... ... Generating phar.php /home/oldboy/tools/php-5.3.27/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory make: *** [ext/phar/phar.php] 错误 127 |
报错:
解决1:
1
2 3 4 5 6 7 8 9 10 11 12 13 14 |
[root@client php-5.3.27]# find / -name "libmysqlclient.so.18"
/home/oldboy/tools/mysql-5.5.32-linux2.6-x86_64/lib/libmysqlclient.so.18 /application/mysql-5.5.32/lib/libmysqlclient.so.18 [root@client php-5.3.27]# echo "/usr/local/lib" >>/etc/ld.so.conf [root@client php-5.3.27]# echo "/application/mysql-5.5.32/lib" >>/etc/ld.so.conf [root@client php-5.3.27]# tail -1 /etc/ld.so.conf /application/mysql-5.5.32/lib [root@client php-5.3.27]# ldconfig [root@client php-5.3.27]# make Generating phar.phar chmod: 无法访问"ext/phar/phar.phar": 没有那个文件或目录 make: [ext/phar/phar.phar] 错误 1 (忽略) Build complete. Don't forget to run 'make test'. |
解决:
1
|
mkdir ext/phar/phar.phar -p
|
问题:make报错
1
2 |
/home/oldboy/tools/php-5.3.27/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
make: *** [ext/phar/phar.php] 错误 127 |
解决办法:
1
|
ln -s /application/mysql/lib/libmysqlclient.so.18 /usr/lib64/
|
报错:
1
2 3 4 |
/home/oldboy/tools/php-5.3.27/ext/xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv'
/home/oldboy/tools/php-5.3.27/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close' collect2: ld returned 1 exit status make: *** [sapi/fpm/php-fpm] Error 1 |
解决办法:
1
|
make ZEND_EXTRA_LIBS='-liconv'
|
精典错误
1
2 3 |
/libxmlrpc/encoding.c:101:undefined reference to 'libiconv_close'
collect2: ld returned 1 exit status make:*** [sapi/fpm/php-fpm] Error 1 |
解决方法:
1
|
#make ZEND_EXTRA_LIBS='-liconv'
|
错误一、编译php出错
1
2 3 4 5 6 |
/php-5.3.2/ext/fileinfo/libmagic/apprentice.c:147:internal compiler error:Segmentation fault
Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. The bug is not reproducible,so it is likely a hardware or OS problem. make:*** [ext/fileinfo/libmagic/apprentice.lo] Error 1 |
解决方法:内存大于1G即可,这是php5.3.2的一个bug
错误二、重新构造configure文件出错
1
2 3 4 5 6 7 8 |
./buildconf --force
Forcing buildconf buildconf:checking installation... buildconf:autoconf version 2.59 (ok) buildconf:Your version of autoconf likely contains buggy cache code. Running vcsclean for you. To avoid this,install autoconf-2.13. Can't figure out your VCS, not cleaning. |
解决方法:编译安装autoconf-2.13
再将autoconf-2.13的auotconf文件至/usr/local/autoconf
——————————————————————–
错误三、编译时缺少库
1
|
configure: error: libXpm.(a|so) not found.
|
解决方法:
1
|
yum install libXpm-devel
|
——————————————————————–
错误四、编译时缺少gmp.h文件
1
|
configure: error: Unable to locate gmp.h
|
解决方法:
1
|
yum install gmp-devel
|
——————————————————————–
错误五
1
|
Configure: error: xml2-config not found. Please check your libxml2 installation.
|
解决方法:
1
2 |
#yum install libxml2 libxml2-devel (For Redhat & Fedora)
# aptitude install libxml2-dev (For ubuntu) |
——————————————————————–
错误六
1
2 |
Checking for pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL’s <evp.h> |
解决方法:
1
|
#yum install openssl openssl-devel
|
——————————————————————–
错误七
1
|
Configure: error: Please reinstall the BZip2 distribution
|
解决方法:
1
|
# yum install bzip2 bzip2-devel
|
——————————————————————–
错误八
1
2 |
Configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/ |
解决方法:
1
2 |
# yum install curl curl-devel (For Redhat & Fedora)
# install libcurl4-gnutls-dev (For Ubuntu) |
——————————————————————–
错误九:
1
|
Configure: error: libjpeg.(also) not found.
|
解决方法:
1
|
# yum install libjpeg libjpeg-devel
|
——————————————————————–
错误十
1
|
Configure: error: libpng.(also) not found.
|
——————————————————————–
解决方法:
1
|
# yum install libpng libpng-devel
|
——————————————————————–
错误十一
1
|
Configure: error: freetype.h not found.
|
解决方法:
1
|
#yum install freetype-devel
|
——————————————————————–
错误十二
1
|
Configure: error: Unable to locate gmp.h
|
解决方法:
1
|
# yum install gmp-devel
|
——————————————————————–
错误十三
1
2 |
Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore! |
解决方法:
1
2 |
# yum install mysql-devel (For Redhat & Fedora)
# apt-get install libmysql++-dev (For Ubuntu) |
——————————————————————–
错误十四
1
|
Configure: error: Please reinstall the ncurses distribution
|
解决方法:
1
|
# yum install ncurses ncurses-devel
|
——————————————————————–
错误十五
1
|
Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
|
解决方法:
1
|
# yum install unixODBC-devel
|
——————————————————————–
错误十六
1
|
Configure: error: Cannot find pspell
|
解决方法:
1
|
# yum install pspell-devel
|
——————————————————————–
错误十七
1
|
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
|
解决方法:
1
2 |
# yum install libmcrypt libmcrypt-devel (For Redhat & Fedora)
# apt-get install libmcrypt-dev |
——————————————————————–
错误十八
1
|
Configure: error: snmp.h not found. Check your SNMP installation.
|
解决方法:
1
|
# yum install net-snmp net-snmp-devel
|
——————————————————————–
错误十九
1
|
configure:error:Cannot find ldap.h
|
解决方法:
1
|
#yum install openldap-devel openldap
|
错误二十
1
|
configure:error:xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
|
解决方法:
1
|
#yum install libxslt libxslt-devel
|
错误二十一
1
|
checking for libevent >=1.4.11 install prefix... configure: error: Could not find libevent >=1.4.11 in /usr/local/php
|
解决方法:
安装libevent-1.4.11以上版本至/usr/local
1
2 3 4 |
tar xzvf libevent-1.4.14-stable.tar.gz
cd libevent-1.4.14-stable ./configure --prefix=/usr/local make&&make install |
在编译./configure时添加–with-libevent-dir=/usr/local即可
错误二十二
1
2 |
cc1: out of memory allocating 2036 bytes after a total of 81846272 bytes
make: *** [ext/date/lib/parse_date.lo] Error 1 |
报错:
1
2 3 |
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status make:*** [sapi/fpm/php-fpm] Error 1 |
解决方法:
1
2 3 4 5 6 7 |
安装ltdl
#cd ../libmcrypt-2.5.7/libltdl/ #./configure --enable-ltdl-install #ldconfig #cd php-5.3.6 #make ZEND_EXTRA_LIBS='-liconv' done s |
LINUX下编译安装PHP各种报错大集合的更多相关文章
- linux下TP5安装好Workerman 报错:Class 'think\worker\Server' not found
今天把功能放到服务器,本地测试正常,上传到服务器上报错Class 'think\worker\Server' not found 首先想到的是Windows和Linux下大小写的问题,查看了代码,并没 ...
- Python在Linux下编译安装报错:Makefile:1141:install
正常情况下执行:./configuremake && make install可以直接安装python,但是在在更新了乌版图后居然报错了!!!检查了一圈,发现乌版图安装了python3 ...
- Heka 编译安装后 运行报错 panic: runtime error: cgo argument has Go pointer to Go pointer
Heka 编译安装后 运行报错 panic: runtime error: cgo argument has Go pointer to Go pointer 解决办法: 1. Start heka ...
- (转)Linux下编译安装log4cxx
Linux下编译安装log4cxx 一个项目的服务器端在Linux平台下,用到了开源日志库log4cxx,这个库是apache项目的一个子库.功能很不错.下面记录下它的编译和安装过程. log4cxx ...
- linux下编译安装vim7.4并安装clang_complete插件
linux下编译安装vim7.4并安装clang_complete插件 因为debian里软件仓库中下载安装的vim是不支持python写的插件的(可以打开vim,在命令模式先输入:py测试一下),导 ...
- linux下编译安装curl
linux下编译安装curl 1.下载curl git clone https://github.com/curl/curl.git 2.在curl目录下生成configure文件 ./buldcon ...
- linux下编译安装boost库
linux下编译安装boost库 linux下编译安装boost库 1.下载并解压boost 1.58 源代码 下载 解压 2.运行bootstrap.sh 3.使用b2进行构建 构建成功的提示 4. ...
- Linux下编译安装Apache Http Server
Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...
- Linux下编译安装qemu和libvirt
目录 [hide] 1 安装qemu 1.1 qemu介绍 1.2 下载源文件 1.3 编译安装 2 安装libvirt 2.1 libvirt介绍 2.2 下载libvirt 2.3 编译安装 3 ...
随机推荐
- 2. 上传Android代码到github
1. 建立git仓库 cd到本地项目根目录,执行git命令 git init 同时会在项目根目录下生成一个.git的隐藏文件 windows下先禁用 ...
- Python AES - base64 加解密
首先python引用AES加密 from Crypto.Cipher import AES 需要先安装 Crypto 模块, 可以使用 easy_install 进行安装 会自动去官网进行搜索 ...
- VS Build目录下各文件的作用
VS2010中各种类型文件的作用: .sln 相当于VC6中 .dsw .vcxproj 相当于VC6中 .dsp .suo 相当于VC6中 .ncb .vcxproj.filter ...
- 设计模式--适配器模式Adapter(结构型)
一.适配器模式 适配器模式的主要作用是在新接口和老接口之间进行适配.将一个类的接口转换成客户端期望的另外一个接口.其实适配器模式有点无赖之举,在前期设计的时候,我们就不应该考虑适配器模式,而应该通过重 ...
- C++内存管理
1. 栈(Stack): 位于函数内的局部变量(包括函数实参),由编译器负责分配释放,函数结束,栈变量失效.2. 堆(Heap): 由new申请的内存,由delete负责 ...
- NGUI之UIRoot——屏幕的自适应分辨率的计算
//原来写在其他博客上的东西,搬迁 预备知识: 要明确的三个概念: 设计分辨率:在编辑器上开发UI使用的分辨率.我们所有的UI都是在这个分辨率下设计制作的. 显示区域分辨率:设备上所显示的UI区域在编 ...
- Python 下载网络mp4视频资源
最近着迷化学, 特别是古代的冶炼技术,感叹古人的聪明. 春秋时期的炼铁方法是块炼铁,即在较低的冶炼温度下,将铁矿石固态还原获得海绵铁,再经锻打成的铁块.冶炼块炼铁,一般采用地炉.平地筑炉和竖炉3种.铁 ...
- css sprite,css雪碧图生成工具V3.0更新
V3.0主要改进 1.增加了单独添加单张图片以及删除单张图片的功能 2.增加了生成.sprite文件用以保存雪碧图信息 3.增加了打开.sprite文件功能 什么是css sprite CSS spr ...
- centos+scala2.11.4+hadoop2.3+spark1.3.1环境搭建
一.Java安装 1.安装包准备: 首先到官网下载jdk,http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads- ...
- Nginx - 配置
1 自动显示目录 autoindex on; 1.1 显示文件大小 autoindex_exact_size off; 默认为on,显示出文件的确切大小,单位是bytes. 改为off后,显示出文件的 ...