找回密码
 立即注册

只需一扫,快速开始

QQ登录

只需一步,快速开始

搜索
查看: 22458|回复: 0

[技术经验] linux编译php5.2版本报错解决方案

[复制链接]

8万

主题

438

回帖

9万

积分

管理员

积分
94403
QQ
发表于 2015-9-25 10:44:59 | 显示全部楼层 |阅读模式
由于某客服安装的是shopex  需要用到很古老的php5.2  因此只能编译安装。
编译命令:
  1. ./configure --prefix=/usr/local/php --enable-fastcgi --enable-zip --enable-fpm --enable-gd-native-ttf --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/etc/php.d --with-bz2 --with-curl --with-libxml-dir --with-gd --with-jpeg-dir --with-freetype-dir --with-png-dir --with-mcrypt --with-mhash --enable-mbstring --with-kerberos --with-gettext --enable-bcmath --with-mysql=/usr/include/mysql/mysql.h --with-mysqli --with-sqlite --enable-pdo --with-pdo-mysql --with-openssl --enable-ftp --with-pear --with-zlib --enable-inline-optimization --enable-calendar --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg
复制代码

安装后报错:
  1. configure: error: Cannot find libmysqlclient under /usr.
  2. Note that the MySQL client library is not bundled anymore!
复制代码
解决方案:如果没有/usr/lib/mysql/,需要先创建文件夹  mkdir -p /usr/lib/mysql

  1. cp /usr/lib64/mysql/* /usr/lib/mysql/
复制代码

下面的报错:
  1. /usr/bin/ld: cannot find -lltdl
  2. collect2: ld returned 1 exit status
  3. make: *** [sapi/cgi/php-cgi] Error 1
复制代码

解决方案:


  1. ldconfig -p |grep ltdl
  2. ln -s /usr/lib64/libltdl.so.7 /usr/lib/libltdl.so
  3. make && make install
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册   

本版积分规则

QQ|Archiver|手机版|小黑屋|站秘书 ( 蜀ICP备15034504号-3 )

GMT+8, 2024-5-8 08:49 , Processed in 0.085957 second(s), 40 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表