编译busybox出现cannot find -lcrypt错误
2014-11-26 15:15
1051 查看
编译busybox出现cannot find -lcrypt错误解决办法
安装busybox时出现错误提示,网上找到答案,记在这以备后面查看
通常在软件编译时出现的usr/bin/ld: cannot find -lxxx的错误,主要的原因是库文件并没有导入的ld检索目录中。 解决方式: 1。确认库文件是否存在,比如-l123, 在/usr/lib, /usr/local/lib,或者其他自定义的lib下有无lib123.so, 如果只是存在lib123.so.1, 那么可以通过ln -sv lib123.so.1 lib123.so,建立一个连接重建lib123.so. 2。检查/etc/ld.so.conf中的库文件路径是否正确,如果库文件不是使用系统路径,/usr/lib, /usr/local/lib, 那么必须在文件中加入。 3。ldconfig 重建ld.so.cache文件,ld的库文件检索目录存放文件。尤其刚刚编译安装的软件,必须运行ldconfig,才能将新安装的库文件导入ld.so.cache. 4。测试,gcc -l123 --verbose.
---------------------------------------------------------------------------------------------/usr/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
出现这个错误的原因是因为在配置busybox的时候,通常配置为静态编译,所以编译后在最后的链接阶段需要链接crypt的静态库文件(libcrypt.a),而非动态库文件(libcrypt.so*),该库文件由glibc提供,通常系统中只安装了glibc,而没有安装glibc-static。
解决方法:
yum provides */libcrypt.a 查询出需要的包,然后安装。
之后的libm,libc报错都是*.a结尾的文件做链接到 /usr/lib下即可
安装busybox时出现错误提示,网上找到答案,记在这以备后面查看
通常在软件编译时出现的usr/bin/ld: cannot find -lxxx的错误,主要的原因是库文件并没有导入的ld检索目录中。 解决方式: 1。确认库文件是否存在,比如-l123, 在/usr/lib, /usr/local/lib,或者其他自定义的lib下有无lib123.so, 如果只是存在lib123.so.1, 那么可以通过ln -sv lib123.so.1 lib123.so,建立一个连接重建lib123.so. 2。检查/etc/ld.so.conf中的库文件路径是否正确,如果库文件不是使用系统路径,/usr/lib, /usr/local/lib, 那么必须在文件中加入。 3。ldconfig 重建ld.so.cache文件,ld的库文件检索目录存放文件。尤其刚刚编译安装的软件,必须运行ldconfig,才能将新安装的库文件导入ld.so.cache. 4。测试,gcc -l123 --verbose.
---------------------------------------------------------------------------------------------/usr/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
出现这个错误的原因是因为在配置busybox的时候,通常配置为静态编译,所以编译后在最后的链接阶段需要链接crypt的静态库文件(libcrypt.a),而非动态库文件(libcrypt.so*),该库文件由glibc提供,通常系统中只安装了glibc,而没有安装glibc-static。
解决方法:
yum provides */libcrypt.a 查询出需要的包,然后安装。
之后的libm,libc报错都是*.a结尾的文件做链接到 /usr/lib下即可
相关文章推荐
- 编译busybox出现cannot find -lcrypt错误的解决办法
- 编译busybox出现cannot find -lcrypt错误的解决办法
- 编译qvfb出现cannot find -lXtst解决
- BusyBox 编译出现问题---scripts/kconfig/lxdialog/dialog.h:128: error
- Qt5.2编译时出现"/usr/bin/ld: cannot find -lxxx" 错误
- linux/在软件编译时出现usr/bin/ld: cannot find -lxxx的错误
- BusyBox 编译出现问题---scripts/kconfig/lxdialog/dialog.h:128: error
- 解决编译linux2.4和linux 2.6内核出现/usr/bin/ld: cannot find -lncurses的问题
- 解决Qt在openSUSE上编译出现“cannot find -lGL”错误
- 解决编译时出现的usr/bin/ld: cannot find -lxxx的错误
- 编译Qt时出现 cannot find -lGL解决方法
- 编译qvfb时出现cannot find -lXtst 错误
- 编译busybox时出现"ioprio_set" undeclared等错误
- 关于QT编译中出现cannot find -lgobject-2.0的错误
- 编译busybox的时候出现error: field 'in' has incomplete type
- u-boot-1.1.6编译过程中出现cannot find -lc
- 解决编译代码出现/usr/bin/ld: cannot find -luuid错误 .
- Linux编译静态链接出现:/usr/bin/ld: cannot find -lc
- Fedora13下编译busybox-1.15.0出现can not find lcrypt错误
- android源码编译出现/usr/bin/ld: cannot find -llzo2 /usr/bin/ld: cannot find -luuid