centos 6.0安装php-5.2.17报错: 前提是mysql已经安装,已经成功启动OK
编译参数:[root@centos6 php-5.2.17]# ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/ mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd --with-iconv --with-freetype --with-jpeg --with-png --with-zlib --with-libxml --enable-xml --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin --enable-session --with-mcrypt
报错信息:checking for mcrypt support... yes checking for libmcrypt version... >= 2.5.6 checking for mcrypt_module_open in -lmcrypt... yes checking for mhash support... no checking whether to include mime_magic support... yes checking for MING support... no checking for mSQL support... no checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... /tmp/mysql.sock checking for MySQL UNIX socket location... /tmp/mysql.sock checking for mysql_close in -lmysqlclient... yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no mysql_config not found configure: error: Please reinstall the mysql distribution
1、no mysql_config not found configure: error
2、你的配置
--with-mysql=/氏含usr/local/mysql
--with-mysqli=/usr/歼腔笑local/mysql/bin/ mysql_config 查查这个地方,似乎有个空格圆好
--with-mysql-sock=/tmp/mysql.sock
3、确认已经安装mysql-devel
rpm -qa|grep mysql-devel
4、如果php5.3可以用mysqlnd (MySQL native driver for PHP)
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd
6.0的CENTOS,为什么不使用YUM直接安装呢逗樱碰,多方便,
yum list |grep appache 获取当前可以安装的版本
yum install appache. 安装相应的程序,就可以颂察了
或者使用RPM包直接安装山谈即可,
试试这个
sudo apt-get install libmysqlclient-dev
再仔细看看