当前位置:   article > 正文

Qt运行功能包error while loading shared libraries: libxxx.so_qt的demo在开发板上报错helloqt2: error while loading shared

qt的demo在开发板上报错helloqt2: error while loading shared libraries: libqt5

问题:

在导入cmakelist之后运行功能包出现找不到动态链接库

error while loading shared libraries: libxmlrpcpp.so: cannot open shared object file: No such file or directory
  • 1
error while loading shared libraries: librosconsole_log4cxx.so: cannot open shared object file: No such file or directory
  • 1

原因:

Qt只加载了其包含的一个库,没有将ros里边相关的库包含进去

环境配置

  • ros-melodic
  • ubuntu18.04
  • Qt5.9.9

解决办法

  1. 打开终端,安装第一个库
sudo apt install libxmlrpcpp-dev
  • 1
  1. 链接其他库
  • 打开ld.so.conf
vi /etc/ld.so.conf
  • 1
  • include ld.so.conf.d/*.conf下边换行添加/usr/local/libopt/ros/melodic/lib
  • 添加好后保存退出,还需要将文件/etc/ld.so.conf列出的路径下的库文件缓存到/etc/ld.so.cache以供使用
/sbin/ldconfig -v
  • 1
  • 接着执行
ldconfig
  • 1

之后就可以重新导入Cmakelist文件进行运行

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/200817
推荐阅读
相关标签
  

闽ICP备14008679号