centos下php安装报错整理

问题描述:
configure error xml2-config not found. please check your libxml2 installation
sendos 5.5 安装 PHP 5.4.3 报 configure error xml2-config not found. please check your libxml2 installation 错误
检查是否安装了libxm包

原因分析:
缺少libxm包,需要安装PHP的依赖包。

解决方案

[root@rh-linux software]# rpm -qa |grep  libxml2
libxml2-2.6.26-2.1.12
libxml2-python-2.6.26-2.1.12
重新安装libxml2和libxml2-devel包, yum安装的时候发现新版本会提示更新,需要更新的可以更新,不要跳过就行了。
# yum install libxml2
# yum install libxml2-devel -y

安装完之后查找xml2-config文件是否存在
# find / -name "xml2-config"

/usr/bin/xml2-config


问题描述:

Configure: error: Please reinstall the BZip2 distribution

解决方法如下:

#yum install bzip2

#yum install bzip2-devel -y


问题描述:

configure: error: Unable to find your mysql installation

我打的命令是:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-pdo-mysql=/var/lib/mysql/mysql.sock --with-jpeg-dir --with-png-dir --with-bz2 --with-freetype-dir --with-iconv-dir --with-zlib-dir  --enable-soap --enable-gd-native-ttf --enable-ftp --enable-sockets --enable-mbstring --enable-exif --enable-memcache --enable-vld

因为我写的mysql位置的路径发生错误,和实际工作路径不符. 

# which mysql
/usr/bin/mysql

mysql的路径与实际工作路径替换添加命令:     --with-mysql-dir=/usr/bin/mysql


问题描述:

checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.

解决问题:

问题无法解决了,我用rpm安装的mysql,用源码编译php遇到各种问题,找了许多网址

这边写的比较清晰,难以找准mysql的依赖http://blog.csdn.net/iquicksandi/article/details/7272226


后来决定用yum安装php

yum install -y php php-devel php-mysql
安装过程中报mysql兼容性错误

file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package MySQL-server-5.6.19-1.linux_glibc2.5.x86_64

后来终于找到http://blog.csdn.net/faye0412/article/details/7895366



最终通过摸索按照如下方式整理完成:

centos6.5下安装php+mysql+apache并整合的具体流程












评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值