/usr/bin/ld: cannot find -lc 解决
2013-12-13 15:27
525 查看
这已经是N+1次出现这个问题了:
+ make
CHK include/version.h
LD ftl_format
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [/home/yangzheng/rootfs/mtd-utiles/mtd-utils-1.4.9/ftl_format] Error 1
+ set -x
[yangzheng@centos6 mtd-utiles]$ cd mtd-utils-1.4.9
主要原因是,在安装Linux时,如果不选择开发环境,会默认安装需要的动态库,但不会安装静态库。如果我们在静态连接程序时,会找不到libc.a这个基础静态库文件。这时我们安装相应的库文件就可以了:
[yangzheng@centos6 mtd-utils-1.4.9]$ sudo yum install -y glibc-static libstdc++-static
+ make
CHK include/version.h
LD ftl_format
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [/home/yangzheng/rootfs/mtd-utiles/mtd-utils-1.4.9/ftl_format] Error 1
+ set -x
[yangzheng@centos6 mtd-utiles]$ cd mtd-utils-1.4.9
主要原因是,在安装Linux时,如果不选择开发环境,会默认安装需要的动态库,但不会安装静态库。如果我们在静态连接程序时,会找不到libc.a这个基础静态库文件。这时我们安装相应的库文件就可以了:
[yangzheng@centos6 mtd-utils-1.4.9]$ sudo yum install -y glibc-static libstdc++-static
相关文章推荐
- linux 解决 Linux: /usr/bin/ld: cannot find -lc Error and Solution
- 【解决】/usr/bin/ld: cannot find -lc
- chkrootkit 编译报错的解决/usr/bin/ld: cannot find -lc
- chkrootkit 编译报错的解决/usr/bin/ld: cannot find -lc
- 【解决】/usr/bin/ld: cannot find -lc
- /usr/bin/ld: cannot find -lc 的解决办法
- 解决g++编译出现/usr/bin/ld: cannot find -lc
- 【解决】/usr/bin/ld: cannot find -lc
- chkrootkit安装过程中出现/usr/bin/ld: cannot find -lc的解决方法
- 编译报错 /usr/bin/ld: cannot find -lc 解决
- /usr/bin/ld: cannot find -lc 解决
- tiny210 安装QTE4.6.0时错误/usr/bin/ld: cannot find -lGLU解决办法
- [解决] [centOS] g++ 带 -static 参数编译时,报错 /usr/bin/ld: cannot find -lm
- /usr/bin/ld: cannot find -lcrypto 错误的解决方法
- 解决/usr/bin/ld: cannot find -lxxx
- Linux: /usr/bin/ld: cannot find -lc Error and Solution
- /usr/bin/ld: cannot find -l* 错误的解决方法……
- redhat 6.4 x64搭建hustoj 编译core程序出现/usr/bin/ld: cannot find -lmysqlclient解决方法
- /usr/bin/ld: cannot find -l* 错误的解决方法
- /usr/bin/ld:cannot find -lGL的解决方法