紧急求助:linux下LAMP环境配置的问题:php连接mysql~!!!_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2390 | 回复: 0   主题: 紧急求助:linux下LAMP环境配置的问题:php连接mysql~!!!        下一篇 
flying
注册用户
等级:下士
经验:153
发帖:75
精华:0
注册:2011-8-25
状态:离线
发送短消息息给flying 加好友    发送短消息息给flying 发消息
发表于: IP:您无权察看 2014-12-12 11:33:31 | [全部帖] [楼主帖] 楼主

本人linux菜鸟,接触linux10天左右,因工作需求匆忙上手,已经baidu+google了好几天,没有找到最终解决方案,烦请过路各位大侠多多指点~~

有关系统:Red Hat Enterprise Linux Server release 5.2,32位
前提条件:该主机在作为一个邮件服务器使用,使用tomcat+mysql。
想在该系统搭建LAMP环境,使用原来已有的mysql,又安装了apache、php、zend等。
遇到很多问题,查了很多资料,现系统环境已经配置得差不多了,apache服务能正常启动,.php页面也能正常访问。
但是,php的mysql扩展没有配置成功。通过phpize来修复mysql扩展的过程中,总是无法成功,config.log记录如下:

---------------------以下为config.log的内容-------------------------------------------------------------------------
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --prefix=/usr/local/mysql --with-php-config=/usr/local/php/bin/php-config --with-mysql-dir=/home/coremail/mysql --with-zlib-dir=/usr/local/zlib
## --------- ##
## Platform. ##
## --------- ##
hostname = coremail
uname -m = i686
uname -r = 2.6.18-92.el5PAE
uname -s = Linux
uname -v = #1 SMP Tue Apr 29 13:31:02 EDT 2008
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/kerberos/sbin
PATH: /usr/kerberos/bin
PATH: /usr/local/sbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /root/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1489: checking for egrep
configure:1499: result: grep -E
configure:1504: checking for a sed that does not truncate output
configure:1558: result: /bin/sed
configure:1679: checking for gcc
configure:1695: found /usr/bin/gcc
configure:1705: result: gcc
configure:1949: checking for C compiler version
configure:1952: gcc --version </dev/null >&5
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-4
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:1955: $? = 0
configure:1957: gcc -v </dev/null >&5
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-4
configure:1960: $? = 0
configure:1962: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:1965: $? = 1
configure:1988: checking for C compiler default output file name
configure:1991: gcc    conftest.c  >&5
configure:1994: $? = 0
configure:2040: result: a.out
configure:2045: checking whether the C compiler works
configure:2051: ./a.out
configure:2054: $? = 0
configure:2071: result: yes
configure:2078: checking whether we are cross compiling
configure:2080: result: no
configure:2083: checking for suffix of executables
configure:2085: gcc -o conftest    conftest.c  >&5
configure:2088: $? = 0
configure:2113: result:
configure:2119: checking for suffix of object files
configure:2140: gcc -c   conftest.c >&5
configure:2143: $? = 0
configure:2165: result: o
configure:2169: checking whether we are using the GNU C compiler
configure:2193: gcc -c   conftest.c >&5
configure:2199: $? = 0
configure:2203: test -z
                         || test ! -s conftest.err
configure:2206: $? = 0
configure:2209: test -s conftest.o
configure:2212: $? = 0
configure:2225: result: yes
configure:2231: checking whether gcc accepts -g
configure:2252: gcc -c -g  conftest.c >&5
configure:2258: $? = 0
configure:2262: test -z
                         || test ! -s conftest.err
configure:2265: $? = 0
configure:2268: test -s conftest.o
configure:2271: $? = 0
configure:2282: result: yes
configure:2299: checking for gcc option to accept ANSI C
configure:2369: gcc  -c -g -O2  conftest.c >&5
configure:2375: $? = 0
configure:2379: test -z
                         || test ! -s conftest.err
configure:2382: $? = 0
configure:2385: test -s conftest.o
configure:2388: $? = 0
configure:2406: result: none needed
configure:2424: gcc -c -g -O2  conftest.c >&5
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
configure:2430: $? = 1
configure: failed program was:
| #ifndef __cplusplus
|   choke me
| #endif
configure:2564: checking whether gcc and cc understand -c and -o together
configure:2594: gcc -c conftest.c -o conftest.o >&5
configure:2597: $? = 0
configure:2599: gcc -c conftest.c -o conftest.o >&5
configure:2602: $? = 0
configure:2609: cc -c conftest.c >&5
configure:2612: $? = 0
configure:2615: cc -c conftest.c -o conftest.o >&5
configure:2618: $? = 0
configure:2620: cc -c conftest.c -o conftest.o >&5
configure:2623: $? = 0
configure:2641: result: yes
configure:2657: checking for system library directory
configure:2675: result: lib
configure:2683: checking if compiler supports -R
configure:2707: gcc -o conftest -g -O2   conftest.c -R /usr/lib  >&5
gcc: unrecognized option '-R'
/usr/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
configure:2713: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
更多 0 分享到:
相关主题推荐: lamp php linux mysql 邮件服务器
相关帖子推荐:

    使用poco c++库访问mysql,如何取数据库表中的datatime类型?
    asp发送短信功能怎么改成php的,有asp例子,求教
    mySql 存储过程游标必须定义在临时表前?调用时发生临时不存在错误,求指导
    求助啊。。。在VC中添加“mysql.h"后,编译报错。
    调用mysql存储过程错误
    搭建linux平台交叉编译,使用eclipse裸机调试6410,有个gdb的问题
    PHP上传文件如何知道超过upload_max_file的值
    json数据的装换

对我有用[0] 丢个板砖[0] 引用 | 举报 | 管理
回复次数:2

nn_shanny
    nn_shanny
    nn_shanny
    本版等级:T1

#1 得分:0 回复于: 2011-03-24 10:05:25
接上:
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
      |
      | ;
      | return 0;
| }
configure:2740: result: no
configure:2745: checking if compiler supports -Wl,-rpath,
configure:2769: gcc -o conftest -g -O2 conftest.c -Wl,-rpath,/usr/lib >&5
configure:2775: $? = 0
configure:2779: test -z
|| test ! -s conftest.err
configure:2782: $? = 0
configure:2785: test -s conftest
configure:2788: $? = 0
configure:2802: result: yes
configure:2845: checking build system type
configure:2863: result: i686-pc-linux-gnu
configure:2871: checking host system type
configure:2885: result: i686-pc-linux-gnu
configure:2893: checking target system type
configure:2907: result: i686-pc-linux-gnu
configure:3005: checking for PHP prefix
configure:3007: result: /usr/local/php
configure:3009: checking for PHP includes
configure:3011: result: -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
configure:3013: checking for PHP extension directory
configure:3015: result: /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
configure:3017: checking for PHP installed headers prefix
configure:3019: result: /usr/local/php/include/php
configure:3063: checking for re2c
configure:3092: result: no
configure:3116: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
configure:3130: checking for gawk
configure:3147: found /usr/bin/gawk
configure:3157: result: gawk
configure:3209: checking for MySQL support
configure:3252: result: yes, shared
configure:3261: checking for specified location of the MySQL UNIX socket
configure:3279: result: no
configure:3289: checking for the location of libz
configure:3307: result: /usr/local/zlib
configure:3322: checking for MySQL UNIX socket location
configure:3358: result: /tmp/mysql.sock
configure:3526: checking for mysql_close in -lmysqlclient
configure:3556: gcc -o conftest -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql conftest.c -lmysqlclient >&5
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
(.text+0xdb): undefined reference to `compress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
(.text+0x16d): undefined reference to `uncompress'
collect2: ld returned 1 exit status
configure:3562: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define HAVE_MYSQL 1
| #define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char mysql_close ();
| int
| main ()
| {
      | mysql_close ();
      | ;
      | return 0;
| }
configure:3588: result: no
configure:3798: checking for mysql_error in -lmysqlclient
configure:3828: gcc -o conftest -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -Wl,-rpath,/usr/local/zlib/lib -L/usr/local/zlib/lib conftest.c -lmysqlclient >&5
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
(.text+0xdb): undefined reference to `compress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
(.text+0x16d): undefined reference to `uncompress'
collect2: ld returned 1 exit status
configure:3834: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define HAVE_MYSQL 1
| #define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char mysql_error ();
| int
| main ()
| {
      | mysql_error ();
      | ;
      | return 0;
| }
configure:3860: result: no
configure:3874: error: mysql configure failed. Please check config.log for more information.


--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论