/usr/bin/ld: 当搜索用于 /home/akira/gujia_ws/src/bodyreader/lib/libastra.so 时跳过不兼容的 -lastra /usr/bin/ld: 找不到 -lastra
时间: 2023-08-02 19:08:09 浏览: 243
根据引用\[1\]中的内容,您可以尝试使用以下命令来解决"/usr/bin/ld: 找不到 -lastra"的问题:
```
sudo ln -s /home/akira/gujia_ws/src/bodyreader/lib/libastra.so /usr/lib/x86_64-linux-gnu/libastra.so
```
这将创建一个软链接,将libastra.so文件链接到/usr/lib/x86_64-linux-gnu目录下。这样ld命令就能找到所需的库文件了。
另外,根据引用\[2\]中的警告信息,您可能需要解决libopencv_imgcodecs.so.3.2、libopencv_imgproc.so.3.2和libopencv_core.so.3.2与libopencv_highgui.so.3.2.0之间的冲突。您可以尝试更新这些库文件或者使用与libopencv_highgui.so.3.2.0版本匹配的libopencv_imgcodecs.so、libopencv_imgproc.so和libopencv_core.so文件。
最后,根据引用\[3\]中的说明,您可以使用-Wl,-rpath选项来指定运行时库的位置,例如:
```
gcc -o your_program your_program.c -lastra -Wl,-rpath=/home/akira/gujia_ws/src/bodyreader/lib
```
这将在编译时指定libastra.so库的位置。
希望这些信息对您有帮助!
#### 引用[.reference_title]
- *1* [安装opencv报错/usr/bin/ld: warning: libpcre.so.1, needed by /home//anaconda3/lib/libglib-2.0.so.0](https://blog.csdn.net/yanzhiwen2/article/details/121757639)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [/usr/bin/ld: warning: libopencv_imgcodecs.so.3.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_high](https://blog.csdn.net/keeplearning365/article/details/121549806)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [/usr/bin/ld: warning: libcudnn.so.7, needed by *gpu.so, not found (try using -rpath or -rpath-link)](https://blog.csdn.net/chengyq116/article/details/104602920)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文