/usr/bin/ld: cannot find -lstdc++ /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc

来源:互联网 发布:淘宝联盟里的优惠卷 编辑:程序博客网 时间:2024/05/01 09:11

1.在编译firefox时候出现下面错误:

/usr/bin/ld: cannot find -lpthread

/usr/bin/ld: cannot find -lstdc++

/usr/bin/ld: cannot find -lm

/usr/bin/ld: cannot find -lc

奇怪,这是最基本的开发库,都没有安装?


2.根据出错前的提示信息,是在连接静态库当中出现了问题:

c++ -o dump_syms  -static host_dump_syms.o ../../../../../../../toolkit/crashreporter/google-breakpad/src/common/linux/libhost_breakpad_linux_common_s.a ../../../../../../../toolkit/crashreporter/google-breakpad/src/common/libhost_breakpad_common_s.a ../../../../../../../toolkit/crashreporter/google-breakpad/src/common/dwarf/libhost_breakpad_dwarf_s.a


3.解决:

搜寻一下:

$ sudo yum search "static" |grep "\(libc\|stdc\+\+\)"
50:glibc-static.i686 : C library static libraries for -static linking.
61:libcxgb3-static.i686 : Static version of the libcxgb3 driver
82:libstdc++-static.i686 : Static libraries for the GNU standard C++ library
192:cdparanoia-static.i686 : Development tools for libcdda_paranoia (Paranoia III)
266:dietlibc.i686 : Small libc implementation
267:dietlibc-devel.i686 : dietlibc development files
268:dietlibc-header.noarch : dietlibc header files
326:libcaca-devel.i686 : Development files for libcaca, the library for Colour AsCii
328:libcap-devel.i686 : Development files for libcap
329:libcddb-devel.i686 : Development files for libcddb

好了,就上面那两个红色部分的包没有安装:

$ sudo yum install glibc-static libstdc++-static
0 0
原创粉丝点击