‘libSophus.so‘: The library is neither a target nor built/installed properly 的参考解决方法

写在前面

自己的测试环境:
Ubuntu20.04
ROS-Noetic

一、问题描述

CMake Error at /***/devel/share/vikit_common/cmake/vikit_commonConfig.cmake:173 (message):
  Project 'vikit_ros' tried to find library 'libSophus.so'.  The library is
  neither a target nor built/installed properly.  Did you compile project
  'vikit_common'? Did you find_package() it before the subdirectory
  containing its code is included?
Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  rpg_vikit/vikit_ros/CMakeLists.txt:17 (FIND_PACKAGE)

二、解决方法

出现这个问题的原因可能是由于 Sophus 库的版本不对导致的。这里列出我自己的解决方法供参考。

由于自己当前安装的是Sophus 的模板库 Sophus-1.22.4-template ,才出现的这个报错。所以我这里重新卸载已安装的 Sophus 的模板库。卸载方法参考《make install 安装的库,如何卸载》
然后,下载 Sophus 的非模板库,并安装。

git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff 
sudo mkdir build
cd build
cmake ..
make
sudo make install

参考链接

[1] wongHome. make install 安装的库,如何卸载 [EB/OL]. https://blog.csdn.net/qq_39779233/article/details/125123326, 2022-08-19/2024-07-29.
[2] https://github.com/strasdat/Sophus.git

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值