ubuntu卸载pangolin库

Pangolin库是在SLAM学习中常用的库之一,因为我在编译ORB-SLAM2过程中,一直报下面这样的错:

Build type: Release
-- Using flag -std=c++11.
-- Using opencv version 3.4.5
CMake Error at CMakeLists.txt:48 (find_package):
  Found package configuration file:

    /usr/local/lib/cmake/Pangolin/PangolinConfig.cmake

  but it set Pangolin_FOUND to FALSE so package "Pangolin" is considered to
  be NOT FOUND.  Reason given by package:

  Pangolin could not be found because dependency Eigen3 could not be found.



-- Configuring incomplete, errors occurred!
See also "/home/dzh/slambook/EAO-SLAM/build/CMakeFiles/CMakeOutput.log".
See also "/home/dzh/slambook/EAO-SLAM/build/CMakeFiles/CMakeError.log".

上网查询十几个链接后,发现不是Eigen3的问题,而是Pangolin版本的问题,所以需要卸载重装。因为pangolin是通过源代码安装的,所以下面步骤适用于所有源代码安装的库的卸载

一、删除库和头文件

cd Pangolin/build
make clean
sudo make uninstall

执行之后就会开始卸载所有的.so文件和.h文件。

二、删除源代码

cd ../..
sudo rm -r Pangolin

执行之后删除源代码文件夹。

三、删除残留文件夹

更新下索引,搜索pangolin的位置

sudo updatedb
locate pangolin

可以看到在/usr/local/include/pangolin目录还未删除,因为第一步是卸载了该目录下的所有.h文件。

/usr/local/include/pangolin
/usr/local/include/pangolin/compat
/usr/local/include/pangolin/console
/usr/local/include/pangolin/display
/usr/local/include/pangolin/factory
/usr/local/include/pangolin/geometry
/usr/local/include/pangolin/gl
/usr/local/include/pangolin/handler
/usr/local/include/pangolin/image
/usr/local/include/pangolin/log

所以,我们将该目录删除即可。

sudo rm -r /usr/local/include/pangolin

四、检验卸载

再次搜索pangolin的位置

locate pangolin

发现只有在Trash中才能找到,卸载成功!

/home/dzh/.local/share/Trash/expunged/2600043745/build/include/pangolin
/home/dzh/.local/share/Trash/expunged/2600043745/build/include/pangolin/factory
/home/dzh/.local/share/Trash/expunged/2600043745/build/include/pangolin/factory/RegisterFactoriesVideoInterface.h
/home/dzh/.local/share/Trash/expunged/2600043745/build/include/pangolin/factory/RegisterFactoriesVideoOutputInterface.h
/home/dzh/.local/share/Trash/expunged/2600043745/build/include/pangolin/factory/RegisterFactoriesWindowInterface.h

五、重新安装

先到 stevenlovegrove /Pangolin 选择ORB-SLAM2对应的0.5版本,然后下载到本地。

然后跟随安装教程,包含编译错误解决:ubuntu18.04安装pangolin库,图文详解

你可能感兴趣的:(Ubuntu,ubuntu,pangolin,slam,eigen,cmake)