ubuntu20.04安装和卸载gtsam

安装boost

Boost >= 1.43 (Ubuntu: sudo apt-get install libboost-all-dev)

安装cmake

CMake >= 3.0 (Ubuntu: sudo apt-get install cmake)

安装TBB

sudo apt-get install libtbb-dev

安装MKL

ubuntu安装与卸载MKL_伴着音乐入梦的博客-CSDN博客按照下面网站循序安装,卸载方法也在里面Installing Intel® Performance Libraries and Intel® Distribution for...这一部只装MKL即可https://blog.csdn.net/weixin_44577224/article/details/124538678?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22124538678%22%2C%22source%22%3A%22weixin_44577224%22%7D&ctrtid=lTEJd下载gtsam

git clone https://bitbucket.org/gtborg/gtsam.git #如果此方法不可行可以在github上下载,链接在下面

在github上下载gtsam源文件

GitHub - borglab/gtsam: GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices. - GitHub - borglab/gtsam: GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.https://github.com/borglab/gtsam按照以下命令进行安装

cd gtsam/
mkdir build 
cd build
cmake ..
make check 
sudo make install 

cmake .. 可能会出现如下错误

CMake Error at wrap/CMakeLists.txt:29 (target_link_libraries):
  The "debug" argument must be followed by a library.

解决方法

找到gtsam/wrap/CMakeLists 文件 把以下内容注释或者删除

  debug
    ${Boost_FILESYSTEM_LIBRARY_DEBUG}
    ${Boost_SYSTEM_LIBRARY_DEBUG}
    ${Boost_THREAD_LIBRARY_DEBUG}

 cmake .. 第二个错误

CMake Error at gtsam/CMakeLists.txt:105 (target_link_libraries):
  The "debug" argument must be followed by a library.

解决方法

注释或删掉gtsam/CMakeLists文件中的俩处代码

 debug
    ${Boost_SERIALIZATION_LIBRARY_DEBUG}
    ${Boost_SYSTEM_LIBRARY_DEBUG}
    ${Boost_FILESYSTEM_LIBRARY_DEBUG}
    ${Boost_THREAD_LIBRARY_DEBUG}
    ${Boost_DATE_TIME_LIBRARY_DEBUG}
    ${Boost_REGEX_LIBRARY_DEBUG}
debug
          ${Boost_TIMER_LIBRARY_DEBUG}
          ${Boost_CHRONO_LIBRARY_DEBUG}

gtsam如果需要安装其他版本需要卸载旧的版本可参考github上的方法:

​​​​​​how can i uninstall gtsam? · Issue #562 · borglab/gtsam · GitHub

最好的办法是再次运行新安装包的构建和安装过程就会覆盖以前的版本。

  • 18
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值