遇到linux php环境搭建下php错误错误该怎么办

linux安装php5出现错误:configure: error: Cannot find libmysqlclient under /usr.
- 飞檐走壁 - ITeye博客
博客分类:
最近在centOs上安装apache+mysql+php5.1.6时,出现如下问题:configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
纠缠了我一天的时间,最后实在不行。还是百度。
得到一篇博文指导,成功解决了问题:原文网址:http://apps./share/detail/
内容如下:
php:http://www.rpmfind.net/linux/rpm2html/search.php?query=php
(rpm)http://cn.php.net/get/php-5.3.0.tar.gz/from/a/mirror
./configure --help | grep mysql
tar -zxvf php-5.3.0.tar.gz
mv php-5.3.0.tar.gz php
cd php rpm -Uvh MySQL-devel-standard-5.0.27-0.rhel4.x86_64.rpm
cp /usr/lib64/mysql/* /usr/lib/mysql/
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/lib --enable-track-vars --with-xml
--with-mysql --with-zlib-dir=/usr/local
#./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/lib --enable-track-vars --with-xml
--with-mysql=/usr/lib64/mysql --with-zlib-dir=/usr/local (不正确)
make install
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/lib --enable-track-vars --with-xml
--with-mysql=/usr/lib64/mysql --with-zlib-dir=/usr/local
今天在64位centos5.2系统上编译PHP526出错,mysql是使用的RPM方式安装的,PHP编译代码:
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
-enable-track-vars --enable-fastcgi --disable-debug
--enable-url-includes --enable-sockets --enable-force-cgi-redirect
--enable-calendar --with-config-file-path=/etc --with-openssl
--with-zlib --with-gettext --enable-magic-quotes --enable-ftp
--with-ttf --with-gdbm --with-gettext --with-iconv --with-xml
--enable-mbstring=all
出现一下错误:
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for 8-bit clean memcmp... yes
checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
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... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
通过查找libmysqlclient,发现是在/usr/lib64/mysql/目录内的libmysqlclient.so.15.0.0做的软连接,PHP默认是去的 /usr/lib/搜索,所以没有找到.找到问题了就好解决了.
解决办法就是:
cp -rp /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so
: --with-mysql=/usr/lib64/mysql (香巴拉) 或者cp /usr/lib64/mysql/* /usr/lib/mysql/
I received the below error when compiling PHP to work as an external
application with the Litespeed API. When you do compile this it’s
called the PHP LSAPI module which is then used by Litespeed to process
PHP Build Error:
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
The issue was that I the MySQL server version was 64-bit and the php
compile script was looking for 32-bit libraries. To see if your MySQL
server is 64-bit or 32-bit check the version by issuing the below
command and looking for a response also shown below.
MySQL Version:
[root@server php-5.2.8]# mysql –version
mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (x86_64) using readline 5.0
To resolve the issue add the below configuration options to your PHP configure script.
Options to Add:
–with-mysql=/usr/bin/ –with-libdir=lib64
So my PHP configure script after adding these options now looked like the below which resolve the compile error.
PHP Configure Script:
./configure –prefix=/var/lsws/lsphp5 –with-litespeed –with-mysqli
–with-mcrypt –with-mysql=/usr/bin/ –with-libdir=lib64 –with-zlib
–with-gd –enable-shmop
–enable-track-vars –enable-sockets –enable-sysvsem –enable-sysvshm –enable-magic-quotes –enable-mbstring –with-iconv
james23dier
浏览: 389564 次
来自: 深圳
有用吗?为啥我的不生效
var flag='${not empty logout}'; ...
单引号也行的
后台 controller 在request中放入loanva ...解决redhat 下安装APACHE+MYSQL+PHP常见错误-红联Linux系统门户
您的位置:
&& 查看内容 - - -
解决redhat 下安装APACHE+MYSQL+PHP常见错误
天真花语发布于
&&字号: &&&&(网友评论&3&条)&
在安装apache+mysql+php时遇到过很多问题、、、这里总结给大家,不过解决办法的前提是安装本地源服务YUM
安装详解,参考:
configure: error: no acceptable cc found in $PATH
yum -y install gcc-c++
configure: error: cannot
giving up flex is not installed, install flex.
yum -y install flex
configure: error: xml2-config not found. Please check your libxml2 installation.
yum -y install libxml2-devel
configure: error: Cannot find OpenSSL's
yum -y install openssl-devel
configure: error: Please reinstall the BZip2 distribution
yum -y install bzip2-devel
configure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/
yum -y install curl-devel
configure: error: libjpeg.(a|so) not found.
yum -y install libjpeg-devel
configure: error: libpng.(a|so) not found.
yum -y install libpng-devel
configure: error: freetype2 not found!
yum -y install freetype-devel
configure: error: Unable to locate gmp.h
yum -y install gmp-devel
configure: error: Cannot find pspell
yum -y install aspell-devel
configure: error: xml2-config not found. Please check your libxml2 installation.
yum install libxml2-devel
[root@learn mysql]# bin/mysql_install_db --user=mysql
Installing MySQL system tables...
:24:56 [Warning] option 'max_join_size': unsigned value
adjusted to
:24:56 [Warning] option 'max_join_size': unsigned value
adjusted to
ERROR: 1004
Can't create file '/tmp/#sql612d_1_0.frm' (errno: 13)
:24:56 [ERROR] Aborting
:24:56 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete
遇到这个错误的时候,只需要chmod 777
/tmp 就OK了
结果:[root@learn mysql]# bin/mysql_install_db --user=mysql
Installing MySQL system tables...
:30:25 [Warning] option 'max_join_size': unsigned value
adjusted to
:30:25 [Warning] option 'max_join_size': unsigned value
adjusted to
希望这些可以帮助那些有志之士及时的解决问题,这些问题有困扰我一天啊、、
作者: D调漫步&发布日期:
顶起!!!
作者: siasleo&发布日期:
牛x~~~~~~~~~~~~~
作者: kbriver520&发布日期:
共有评论数 3/每页显示数 10
发表评论,与各位同人交流。回复请点击下方的我要评论按钮(游客可回复),要发表贴子请点击
Linux教程下载?“”(请点击),Linux教程免费下载。
求助Linux问题?论坛有39版块,覆盖所有Linux技术层面。前往“”
 |  |  |  |  |  |  |  |  |  |  |  | 
&2017 红联 Powered by SupSitecentos6.5 linux源码安装php时遇到的错误 - 记得别人忘了自己 - ITeye博客
./configure时遇到错误
xml-config,libxml2 can not be found
记得装了libxml2,于是索性重装(应该是没有装libxml2-devel)
yum -y install libxml2-devel libxml2-static
再次configure,通过
ext/opcache/ZendAccelerator.lo' is not a valid libtool object
这是因为,我写成了make & make isntall!
[root@centos1 opt]# history |grep make
make & make install
make & make install
ps -ef |grep make
history |make
再次 make && make install
运行 php test,又没有通过测试!(这个我不管了,上传mail 报个bug就好)
Number of tests : 13419
Tests skipped
: 4570 ( 34.1%) --------
Tests warned
Tests failed
Expected fail
Tests passed
: 8816 ( 65.7%) ( 99.6%)
---------------------------------------------------------------------
Time taken
204 seconds
=====================================================================
=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Test open_basedir configuration [tests/security/open_basedir_linkinfo.phpt]
XFAIL REASON: BUG: open_basedir cannot delete symlink to prohibited file. See also
bugs 48111 and 52176.
Inconsistencies when accessing protected members [Zend/tests/access_modifiers_008.phpt]
XFAIL REASON: Discussion: /?l=php-internals&m=957&w=2
Inconsistencies when accessing protected members - 2 [Zend/tests/access_modifiers_009.phpt]
XFAIL REASON: Discussion: /?l=php-internals&m=957&w=2
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770.phpt]
XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_2.phpt]
XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_3.phpt]
XFAIL REASON: See Bug #48770
Bug #63336 (invalid E_NOTICE error occur) [Zend/tests/bug63336.phpt]
XFAIL REASON: Bug is not fixed yet
Bug #64896 (Segfault with gc_collect_cycles using unserialize on certain objects) [Zend/tests/bug64896.phpt]
XFAIL REASON: We can not fix this bug without a significant (performace slow down) change to gc
Initial value of static var in method depends on the include time of the class definition [Zend/tests/method_static_var.phpt]
XFAIL REASON: Maybe not a bug
DateTime::add() -- fall type2 type3 [ext/date/tests/DateTime_add-fall-type2-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type2 [ext/date/tests/DateTime_add-fall-type3-type2.phpt]
XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type3 [ext/date/tests/DateTime_add-fall-type3-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::add() -- spring type2 type3 [ext/date/tests/DateTime_add-spring-type2-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type2 [ext/date/tests/DateTime_add-spring-type3-type2.phpt]
XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type3 [ext/date/tests/DateTime_add-spring-type3-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type2 type3 [ext/date/tests/DateTime_diff-fall-type2-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type2 [ext/date/tests/DateTime_diff-fall-type3-type2.phpt]
XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type3 [ext/date/tests/DateTime_diff-fall-type3-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type2 type3 [ext/date/tests/DateTime_diff-spring-type2-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type2 [ext/date/tests/DateTime_diff-spring-type3-type2.phpt]
XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type3 [ext/date/tests/DateTime_diff-spring-type3-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type2 type3 [ext/date/tests/DateTime_sub-fall-type2-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type2 [ext/date/tests/DateTime_sub-fall-type3-type2.phpt]
XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type3 [ext/date/tests/DateTime_sub-fall-type3-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type2 type3 [ext/date/tests/DateTime_sub-spring-type2-type3.phpt]
XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type2 [ext/date/tests/DateTime_sub-spring-type3-type2.phpt]
XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type3 [ext/date/tests/DateTime_sub-spring-type3-type3.phpt]
XFAIL REASON: Various bugs exist
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, bd2) [ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd2.phpt]
XFAIL REASON: Still not quite right
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, fs) [ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-fs.phpt]
XFAIL REASON: Still not quite right
Bug #42718 (unsafe_raw filter not applied when configured as default filter) [ext/filter/tests/bug42718.phpt]
XFAIL REASON: FILTER_UNSAFE_RAW not applied when configured as default filter, even with flags
Bug #67296 (filter_input doesn't validate variables) [ext/filter/tests/bug49184.phpt]
XFAIL REASON: See Bug #49184
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Testing reading and writing to DOMNode::textContent [ext/dom/tests/node_textcontent.phpt]
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using UTF-* [ext/xml/tests/bug32001.phpt]
=====================================================================
浏览: 177374 次
wuhan_liurui 写道安装这种配置并没有成功,上面说的 ...
安装这种配置并没有成功,上面说的,需要仔细阅读spring 官 ...
maven clean后无法生成。class文件
非常感谢,我也遇到这个问题,用楼主的方法解决问题了。
今天被这个问题害了...君,已阅读到文档的结尾了呢~~
广告剩余8秒
文档加载中
新手 linux 适合新手的linux linux 错误码 linux安装错误 linux错误号 linux 段错误 linux 错误日志 linux 时钟错误 linux 获取错误码 linux 查看错误日志
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
linux下遇到错误解决(新手)
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口安全检查中...
请打开浏览器的javascript,然后刷新浏览器
< 浏览器安全检查中...
还剩 5 秒&}

我要回帖

更多关于 linux php 500错误 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信