/usr/bin/ld: cannot find -lmysqlclien
作者:佚名
上传时间:2019-05-25
版权申诉
环境
centos5.7 x86_64 系统上安装postfix !
错误
"/usr/bin/ld: cannot find -lmysqlclient"
类似/usr/bin/ld: cannot find -xxxx的错误有很多,
最简单的判断一下:是否安装相应的mysql-devel包
发现mysql-devel 包已经安装了
- # rpm -qa | grep mysql
- mysql-devel-5.0.77-4.el5_6.6
- mysql-server-5.0.77-4.el5_6.6
- mysql-devel-5.0.77-4.el5_6.6
- mysql-5.0.77-4.el5_6.6
- php-mysql-5.1.6-27.el5_5.3
- mysql-5.0.77-4.el5_6.6
仔细再次查看 错误信息,发现都是 /usr/lib/mysql/
- [postfix-2.6.13]$ make makefiles ' CCARGS =-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' ' AUXLIBS =-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto'
- /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
- /usr/bin/ld: cannot find -lmysqlclient
- collect2: ld returned 1 exit status
- make: *** [master] Error 1
- make: *** [update] Error 1
- [postfix-2.6.13]$ cat conf/makedefs.out
- # Do not edit -- this file documents how Postfix was built for your machine.
- SYSTYPE = LINUX2
- AR = ar
- ARFL = rv
- RANLIB = ranlib
- SYSLIBS = -L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto -ldb -lnsl -lresolv
- CC = gcc $(WARN) -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS
- OPT = -O
- DEBUG = -g
- AWK = awk
- STRCASE =
- EXPORT = AUXLIBS = '-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto' CCARGS = '-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' OPT = '-O' DEBUG = '-g'
- WARN = -Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
- -Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
- -Wunused -Wno-missing-braces
解决方法,指定 为/usr/lib64/mysql
- [postfix-2.6.13]$ make clea
- [postfix-2.6.13]$ make makefiles ' CCARGS =-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' ' AUXLIBS =-L/usr/lib64/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto'
- [postfix-2.6.13]$ cat conf/makedefs.out
- # Do not edit -- this file documents how Postfix was built for your machine.
- SYSTYPE = LINUX2
- AR = ar
- ARFL = rv
- RANLIB = ranlib
- SYSLIBS = -L/usr/lib64/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto -ldb -lnsl -lresolv
- CC = gcc $(WARN) -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS
- OPT = -O
- DEBUG = -g
- AWK = awk
- STRCASE =
- EXPORT = AUXLIBS = '-L/usr/lib64/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto' CCARGS = '-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' OPT = '-O' DEBUG = '-g'
- WARN = -Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
- -Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
- -Wunused -Wno-missing-braces
- make && make isntall
本文转自 dongnan 51CTO博客,原文链接:
http://blog.51cto.com/dngood/744748
http://blog.51cto.com/dngood/744748
免责申明:文章和图片全部来源于公开网络,如有侵权,请通知删除 server@dude6.com
用户评论
相关推荐
/usr/bin/ld: cannot find -lmysqlclien
环境 centos5.7 x86_64 系统上安装postfix ! 错误 "/usr/bin/ld: cannot find -lmysqlcli
darknet usr bin ld cannot find lcuda
ubuntu18.04 , cuda10.0 编译darknet出现/usr/bin/ld: cannot find -lcuda cannot find -lcuda 意思是编译时未找到libcud
PDF
29KB
2021-01-15 15:38
Linux编译静态链接出现usr bin ld cannot find lc解决方式
Linux编译静态链接出现:/usr/bin/ld:cannotfind-lc.将libc.a拷贝到usr/lib/中,问题得以解决。
A
0B
2019-07-19 10:19
安装chkrootkit 报 /usr/bin/ld: cannot find -lc出错
1、环境:系统centos x64 6.6 2、软件:安装chkrootkit出错
usr/bin/ld: cannot find 错误解决方法
参考:http://blog.siyebocai.cn/20100324_5p424qs7.html 通常在软件编译时出现的usr/bin/ld: cannot find
usr/bin/ld: cannot find 错误解决方法
参考:http://blog.siyebocai.cn/20100324_5p424qs7.html 通常在软件编译时出现的usr/bin/ld: cannot find -lx
LAMP编译:usr bin ld cannot find lltdl 错误的解决办法
文章来源:http://yangsiwei.com/usr-bin-ld-cannot-find-lltdl-%E9%94%99%E8%AF%AF%E7%9A%84%E8%A7%A3%E5%
usr bin ld找不到lcuda
1,这是一个压缩文件,解压后名称应为libcuda.so,是cuda库中的一个重要文件。2,这个文件用于不具备cuda显卡的电脑在ubuntu平台配置gpgpu-sim时,绕过因为找不到lcuda而无
7Z
0B
2019-09-07 02:49
AIX系统中遇到/usr/bin/ld: 0706-006 Cannot find or open library文件的问题
这个错误表明链接器无法找到或打开指定的库文件。出现这种情况通常是由于系统找不到所需的库文件路径或者库文件本身不存在。首先,您需要确认指定的库文件是否存在于系统中,并检查库文件的路径是否正确。可以使用f
AIX 7.2
AIX
2023-12-04 02:43
编译PHP报错configure error Cannot find libmysqlclient under usr的解决方法
今天在64位Red Hat Enterprise Linux AS release 4 .7上编译PHP5.2.6出错,mysql是使用的RPM方式安装的,PHP编译代码如下: ./configure
PDF
33KB
2020-12-22 11:12