前言:
之前跑lio-sam的时候,对于gtsam库的使用出现了错误,最后查明是gtsam的版本造成的错误。gtsam有两种安装方式,一种是build from source,另一种是命令行安装。命令行安装和source版本会冲突,然后就在这个版本上面花了很多时间。想把之前安装的一个版本卸载干净,在网上找了很久也没有一个明确的回答,都说会直接覆盖,但跑lio-sam的错误还是相同的。跑它里面example的错误都一样,所以为怀疑它并没有卸载干净。花费了很多精力,终于找到了一个将它们卸载干净的方法,记录一下。
方法:
来源:
Failing examples on 20.04 · Issue #772 · borglab/gtsam · GitHub
- If you installed with apt-get, uninstall
- Search for libgtsam.xxxxx in /usr/lib and /usr/local/lib, make sure there is none
- make sure there is no /usr/include/gtsam and /usr/local/include/gtsam
- Yes, it's a dynamic library, for details see ldconfig documentation.
简单来说就是把/usr/lib和/usr/local/lib里面关于gtsam的文件全部删除干净。确保把/usr/include/gtsam和/usr/local/include/gtsam两个文件全部删除。
我尝试之后,确实是把4.0.0卸载干净了,重新安装了4.0.2,虽然跑lio-sam还是不行,但是跑它的example成功了。证明这个方法是可行的。觉得这个对于所有的第三方安装的库都是可以的。