error: cannot find -llibmysql_init

3043人阅读
开发环境的搭建(2)
今天在编译代码的时候出现 “/usr/bin/ld: cannot find -luuid” 错误,在网上找了些资料发现是 gcc编译时找不到链接的库,解决办法如下:
&1. 在终端下运行命令: locate libuuid
&&&&&&& 说明:出现的错误是luuid,为什么在locate后面是 libuuid,这是由于链接库的命名造成的。假如出现了 “/usr/bin/ld: cannot find -lltdl”,则在终端输入:locate libltdl,即把 -l 去掉。
&&&&&&& 我的系统中运行 locate libuuid 命令后 ,出现的内容如下:
&&&&&&& /lib/libuuid.so.1
&&&&&&& /lib/libuuid.so.1.3.0
&&&&&&& /usr/i586-mingw32msvc/lib/libuuid.a
&&&&&&& /usr/lib/wine/libuuid.a
&&&&&&& /usr/share/doc/libuuid-perl
&&&&&&& /usr/share/doc/libuuid1
&&&&&&& /usr/share/doc/libuuid-perl/changelog.Debian.gz
&&&&&&& /usr/share/doc/libuuid-perl/changelog.gz
&&&&&&& /usr/share/doc/libuuid-perl/copyright
&&&&&&& /usr/share/doc/libuuid1/changelog.Debian.gz
&&&&&&& /usr/share/doc/libuuid1/changelog.gz
&&&&&&& /usr/share/doc/libuuid1/copyright
&&&&&&& /var/lib/libuuid
&&&&&&& /var/lib/dpkg/info/libuuid-perl.list
&&&&&&& /var/lib/dpkg/info/libuuid-perl.md5sums
&&&&&&& /var/lib/dpkg/info/libuuid1.list
&&&&&&& /var/lib/dpkg/info/libuuid1.md5sums
&&&&&&& /var/lib/dpkg/info/libuuid1.postinst
&&&&&&& /var/lib/dpkg/info/libuuid1.postrm
&&&&&&& /var/lib/dpkg/info/libuuid1.shlibs
&&&&&&& /var/lib/dpkg/info/libuuid1.symbols&
&& 申明: 若是没有装uuid的库是不会出现上面红色部分的,若是没装uuid库,打开新立得安装uuid有关的库,即可解决!
& 2.创建相应的链接文件。
&&&&&&& 注意到其中的/lib/libuuid.so.1, /lib/libuuid.so.1.3.0,我选择/lib/libuuid.so.1& 并为其创建链接文件,终端命令如下:
&&&&&&& &sudo ln -sf /lib/libuuid.so.1 /usr/lib/libuuid.so
& 3.命令成功后,会在 /usr/lib& 目录下生成 libuuid.so
再次编译代码,成功!
上述方法应该可以解决所有 & /usr/bin/ld: cannot find -lxxx& 错误,自己未验证,因为以前没遇到类似的错误!
&&相关文章推荐
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:8122次
排名:千里之外
(2)(3)(1)(1)xg2007524 的BLOG
用户名:xg2007524
文章数:47
访问量:68477
注册日期:
阅读量:5863
阅读量:12276
阅读量:421995
阅读量:1110363
[匿名]thinkage:
51CTO推荐博文
安装php make的时候提示如下出错信息:
/usr/bin/ld: cannot find -lltdlcollect2: ld returned 1 exit
statusmake: *** [libphp5.la] Error 1
解决方法:这是因为找不到:&& libltdl库文件
ldconfig -p |grep ltdl
#/software/libmcrypt-2.5.8/libltdl
#./configure& Cenable-ltdl-install
#make install
了这篇文章
类别:┆阅读(0)┆评论(0)安卓NDK(42)
LOCAL_LDLIBS
指定lib,该lib由不同的平台的系统提供,我们看看
D:\ProgramFiles\android-ndk-r10\platforms
该目录下提供了ndk的版本的库文件
使用ndk-build,默认使用最低版本的库文件,此时容易出现找不到一些库文件
ndk-build APP_PLATFORM=android-9
&&相关文章推荐
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:248414次
积分:6972
积分:6972
排名:第2977名
原创:431篇
转载:275篇
(1)(8)(2)(6)(11)(7)(4)(1)(5)(6)(10)(13)(38)(26)(22)(13)(26)(107)(42)(34)(28)(40)(36)(40)(68)(27)(7)(43)(30)(6)访问量:2079
注册日期:
阅读量:5863
阅读量:12276
阅读量:421995
阅读量:1110363
[匿名]????????:
[匿名]shujian521125:
[匿名]zhaisj:
51CTO推荐博文
系统版本[root@web php-5.3.27]# cat /etc/redhat-release&CentOS release 6.5 (Final)LNMP编译安装php的过程中报错:第一个报错:configure: error: Cannot find ldap.h解决办法:yum&install&openldap&openldap-devel&&-y第二个报错:configure: error: Cannot find ldap libraries in /usr/lib解决办法:cp&-frp&/usr/lib64/libldap*&/usr/lib/然后再./configure ...即可本文出自 “” 博客,请务必保留此出处
了这篇文章
类别:未分类┆阅读(0)┆评论(0)QT环境搭建常见的bug解决 --&ld: cannot find –lbootstrap 错误
时间: 09:32:16
&&&& 阅读:418
&&&& 评论:
&&&& 收藏:0
标签:&&&&&&&&&&&&&&&&&&常见错误列表
一、编译arm环境的时候:
./configure -prefix
$HOME/Qtenv/arm -embedded arm-nomake docs -nomake demo -nomake examples
1、configure完成之后,make出现问题:/usr/bin/ld: cannot find –lbootstrap 错误
解决方法:提示找不到bootstrap库,而实际的qt中是由这个库的,就在src/tools/bootstrap/目录下,可以通过如下命令手动编译这个库:
&&&&&&&&&&&&&&&&&&
cd/src/tools/bootstrap/
&&&&&&&&&&&&&&&&&&
../../../bin/qmake
&&&&&&&&&&&&&&&&&&
这样做的话如果再回到qt安装目录运行make的话就不会出现上面的错误.
2、在编译Qt4.6.3的时候总是报这个错误:/usr/bin/ld: cannot find –lbootstrap
配置脚本如下:./configure -prefix $HOME/Qtenv/arm -embedded arm-nomake docs -nomake
demo -nomake examples
但是,使用如下配置文件却正常编译完成,
$ ./configure -opensource -confirm-license -release -shared -embeddedarm
-depths 16,18,24 -fast -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg-qt-zlib
-qt-libpng -qt-freetype -little-endian -host-little-endian-no-qt3support
-no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2-no-3dnow -no-webkit
-no-phonon -no-nis -no-opengl -no-cups -no-glib-no-xcursor -no-xfixes -no-xrandr
-no-xrender -no-separate-debug-info -nomakeexamples -nomake tools -nomake docs
-qt-mouse-tslib -I/usr/local/tslib/include-L/usr/local/tslib/lib
二、在编译qt-x11-opensource-src-4.5.3是出现“Basic XLib functionality test failed“
解决方法:
此完整出错信息是在./configure阶段
Basic XLib functionality test failed!
You might need to modify the include andlibrary search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in
/home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/linux-g++
进config.test/x11/xlib执行make命令,看出错信息
g++ -Wl,-O1-o xlib xlib.o&&& -L/usr/X11R6/lib -lXext -lX11
/usr/bin/ld: cannot find –lXext
可以看到,g++在/usr/X11R6/lib下,找不到libXext.so
其原因就在于需要安装libX11的开发包,在ubuntu/debian里包名都是libX11-dev
根据以往的经验,在./configure前主动装好下面3个包,基本上就万事大吉了
sudo apt-get install libX11-dev libXext-devlibXtst-dev
问题解决!
编译Qt/E-4.6.3出现的问题
&built-in&:0: note: candidates are:void* operator new(unsigned
int)make[1]: *** [.pch/release-shared-emb-arm/QtCore.gch/c++] 错误
1make[1]: Leaving directory `/opt/qte-4.5.2/src/corelib‘make: ***
[sub-corelib-make_default-ordered] 错误 2
解决方法:./configure的参数问题,安装安装文档给出的选项即可完成。
四、/usr/bin/ld: cannot find -l* 错误的解决方法……
需要安装:libtools
../bootstrap/libbootstrap.a: could not readsymbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [../../../bin/moc] Error 1
make[1]: Leaving directory
`/home/vikikivi/mini2440-bootstrap/qt-embedded-linux-opensource-src-4.5.3/src/to
make: *** [sub-moc-install_subtargets-ordered]Error 2
解决方案:严格按照./configure的选项进行设置。
cannot find lGL
/usr/bin/ld: cannot find -lGL
$ sudo apt-get install libgl1-mesa-devlibgl1-mesa-dev 6.5.2-3ubuntu8
make的时候&libtool:link:
only absolute run-paths areallowed错误&解决办法:&要修改/tslib/plugins/Makefile里面找rpath将LDFLAGS
:=$(LDFLAGS) -rpath $(PLUGIN_DIR)修改为:LDFLAGS :=$(LDFLAGS) -rpath `cd
$(PLUGIN_DIR)&& pwd`
./configure--host=arm-linux的时候:aclocal:
configure.ac: 8: macro`AM_DISABLE_STATIC‘ not found in
librar这是因为没有安装libtool,安装libtool后即可
Can‘t exec "libtoolize": No such fileor directory at /usr/bin/autoreconf line
Use of uninitialized value $libtoolize in patternmatch (m//) at
/usr/bin/autoreconf line 190.
configure.ac:25: error: possibly undefined macro:AC_DISABLE_STATIC
&&&&& If this token and others are legitimate,
pleaseuse m4_pattern_allow.
&&&&& See the Autoconf documentation.
configure.ac:26: error: possibly undefined macro:AC_ENABLE_SHARED
configure.ac:27: error: possibly undefined macro:AC_LIBTOOL_DLOPEN
configure.ac:28: error: possibly undefined macro:AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exitstatus: 1
解决方法在ubuntu下安装lobtool.deb
ts_test.o(.text+0x218): In function `main‘:
: undefined reference to `rpl_malloc‘
fbutils.o(.text+0x234): In function`open_framebuffer‘:
: undefined reference to `rpl_malloc‘
collect2: ld returned 1 exit status
make[2]: *** [ts_test] Error 1
make[2]: Leaving directory`/home/gfpeak/Desktop/tslib/tests‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory`/home/gfpeak/Desktop/tslib‘
make: *** [all] Error 2
解决方法是在编译的时候./configure后面的参数没有设置对,正确设置如下:
./configure--prefix=/usr/local/tslib/ --host=arm-linux
ac_cv_func_malloc_0_nonnull=yes
在开发板上运行校正程序时出现No raw modules loaded
解决方法是把& tslib/etc目录下的ts.conf 的 "#module_raw input"的注释符号“#”去掉。但记住不要在前面留有
空格 ,否则会出现错误4
在开发板上运行校正程序时出现Segmentation fault
解决方法是看错误3。
/usr/include/bits/fcntl2.h:51: error: callto ‘__open_missing_mode’ declared
with attribute error: open with O_CREAT insecond argument needs 3
argumentsmake[2]: *** [ts_calibrate.o] Error 1make[2]: Leaving directory
`/root/soft/tslib/ts_lib/tslib/tests‘make[1]: *** [all-recursive] Error
1make[1]: Leaving directory `/root/soft/tslib/ts_lib/tslib‘
make: *** [all] Error 2
解决办法:将open函数的修改如下:
cal_fd = open("/etc/pointercal", O_CREAT | O_RDWR ,0);标签:&&&&&&&&&&&&&&&&&&原文:/ganrui/p/3708034.html
教程昨日排行
&&国之画&&&& &&&&&&
&& &&&&&&&&&&&&&&
鲁ICP备号-4
打开技术之扣,分享程序人生!}

我要回帖

更多关于 mysql_init 的文章

更多推荐

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

点击添加站长微信