主要问题是
/usr/bin/ld: cannot find -ldl
和 /usr/bin/ld: cannot find -lrt
1. opkg install gcc make
2. wget cmake-3.13.tar.gz && tar -xzf cmake-3.13.tar.gz
3. cd cmake-3.13
4. find . -name "*.cmake.in" -exec sed -i "s/-lrt//g" '{}' \;
5.find . -name "*.cmake.in" -exec sed -i "s/-ldl//g" '{}' \;
6. sed -i "s/-ldl//g" bootstrap && sed -i "s/-lrt//g" bootstrap
7. ./bootstrap --prefix=/usr
8. make
9. find . -name "link.txt" -exec sed -i "s/-ldl//g" '{}' \;
10. find . -name "link.txt" -exec sed -i "s/-lrt//g" '{}' \;
11.find . -name Makefile2 -exec sed -i "s/-ldl//g" '{}' \;
12.find -name Makefile2 -exec sed -i "s/-lrt//g" '{}' \;
13.make
14.make install
本文提供了一套详细的步骤来解决在编译过程中遇到的/usr/bin/ld:cannot find -ldl 和 /usr/bin/ld:cannot find -lrt 错误。通过安装必要的软件包,下载并配置cmake,以及修改特定的cmake文件,可以有效地解决这些常见的链接问题。
3130

被折叠的 条评论
为什么被折叠?



