Ubuntu 18.04 中 卸载/安装G2O库
卸载
- 删除的头文件,位于/usr/local/include/g2o
sudo rm -r /usr/local/include/g2o
- 删除库文件,位于/usr/local/lib中
sudo rm -r /usr/local/lib/libg2o*
- 删除g2o的可执行文件,位于/usr/local/bin下
sudo rm -r /usr/local/bin/g2o*
安装
1.安装依赖项:
sudo apt-get install libeigen3-dev sudo apt-get install libsuitesparse-dev sudo apt-get install qtdeclarative5-dev sudo apt-get install qt5-qmake sudo apt-get install libqglviewer-dev sudo apt install libqglviewer-dev-qt4
从github中下载最新版g2o或者其他方式下载旧版本
git clone https://github.com/RainerKuemmerle/g2o
在下载的g2o文件夹中打开Terminal,依次输入下述命令:
mkdir build cd build sudo cmake .. sudo make sudo make install