LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 990|回复: 5

搜索所有资料都没有解决的问题-编译php的报错

[复制链接]
发表于 2006-8-18 17:08:59 | 显示全部楼层 |阅读模式
操作系统:Fedora Core 5
mysql:mysql-standard-5.0.24查看网上说换成mysql-max-5.0.24(错误一样)
php 5
在编译的时候出现如下错误
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... /tmp/mysql.sock
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.

请高手给予指点!
发表于 2006-8-18 17:15:40 | 显示全部楼层
首先编译就有提示了
  1. configure: error: mysql configure failed. Please check config.log for more information.
复制代码

为什么不好好看一下config.log的描述

还有,真的是搜索过所有资料了
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=77079
论坛里网络服务器的精华贴你肯定没有看过,照着这个做一般都不会有错,虽然版本不一样
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-18 17:25:02 | 显示全部楼层
我第一个看的就是这个帖子
也是按照这个帖子来做的,但是并不像楼上说的一样,差不多,有地方方还是差很多的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-18 17:31:09 | 显示全部楼层
这是config.log内的信息
configure:52508: checking for mSQL support
configure:52947: checking for MSSQL support via FreeTDS
configure:53561: checking for MySQL support
configure:53607: checking for specified location of the MySQL UNIX socket
configure:53664: checking for MySQL UNIX socket location
configure:55286: checking size of char
configure:55326: checking size of int
configure:55365: checking size of long
configure:55404: checking size of long long
configure:55443: checking for size_t
configure:55476: checking whether time.h and sys/time.h may both be included
configure:55511: checking for uid_t in sys/types.h
configure:55546: checking for type ulong
configure:55589: checking for type uchar
configure:55632: checking for type uint
configure:55675: checking for type ushort
configure:55718: checking for int8
configure:55774: checking base type of last arg to accept
configure:55851: checking return type of qsort
configure:56221: checking for mysql_close in -lmysqlclient
configure:56240: gcc -o conftest -g -O2  -D_POSIX_PTHREAD_SEMANTICS
-R/usr/local/mysql/lib -L/usr/local/mysql/lib  -R/usr/ucblib
-L/usr/ucblib -R/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1
-L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1 conftest.c
-lmysqlclient  -lz -lresolv -lm -ldl -lnsl -lsocket  -lgcc 1>&5
ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(libmysql.o):
wrong ELF class: ELFCLASS64
Undefined                       first referenced
symbol                             in file
mysql_close                         /var/tmp//ccWoOvyb.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 56229 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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:56445: checking for mysql_error in -lmysqlclient
configure:56464: gcc -o conftest -g -O2  -D_POSIX_PTHREAD_SEMANTICS
-R/usr/local/mysql/lib -L/usr/local/mysql/lib  -R/usr/ucblib
-L/usr/ucblib -R/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1
-L/usr/local/mysql/lib  -R/usr/ucblib -L/usr/ucblib
-R/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1
-L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1 -R/usr -L/usr conftest.c
-lmysqlclient  -lz -lz -lresolv -lm -ldl -lnsl -lsocket  -lgcc 1>&5
ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(libmysql.o):
wrong ELF class: ELFCLASS64
Undefined                       first referenced
symbol                             in file
mysql_error                         /var/tmp//cc4LMGjA.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 56453 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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; }
回复 支持 反对

使用道具 举报

发表于 2006-8-18 18:07:40 | 显示全部楼层
  1. -R/usr/local/mysql/lib -L/usr/local/mysql/lib -R/usr/ucblib
  2. -L/usr/ucblib -R/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1
  3. -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1 conftest.c
  4. -lmysqlclient -lz -lresolv -lm -ldl -lnsl -lsocket -lgcc 1>&5
  5. ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(libmysql.o):
复制代码

还是找不到mysql的头文件,你在编译mysql的时候有没有指定位置?
编译php的时候指向的位置也要一样
回复 支持 反对

使用道具 举报

发表于 2006-8-24 17:11:53 | 显示全部楼层
指定位置了,如果不制定mysql的位置就不错出现错误!
回复 支持 反对

使用道具 举报

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

本版积分规则

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