# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
-
apt-get update 进行软件更新
-
安装一些依赖库
安装 cmake
sudo apt-get install cmake
安装 google-glog + gflags
sudo apt-get install libgoogle-glog-dev
安装 BLAS & LAPACK
sudo apt-get install libatlas-base-dev
安装 SuiteSparse and CXSparse
sudo apt-get install libsuitesparse-dev
安装Pangolin 需先安装三个依赖
Glew:
sudo apt-get install libglew-dev
Boost:
sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev
Python2 / Python3:
sudo apt-get install libpython2.7-dev
正式安装Pangolin
git clone https://github.com/stevenlovegrove/Pangolin.gitcd Pangolin
mkdir build
cd build
cmake -DCPP11_NO_BOOST=1 ..
make -j
opencv依赖
sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg.dev libtiff4.dev libswscale-dev libjasper-dev
需要注意的是ROS环境搭建时,最好使用镜像,否则会很慢
sudo apt-get install libeigen3-dev
sudo updatedb
我先是按照上边方法安装的,在编译时候遇到Sophus无法编译的问题,
原因是 Sophus需要Eigen3.3.0 以上版本,而默认安装的是3.2.9 坑啊!
下面这个方法完美解决
ubuntu16.04通过sudo apt-get install libeigen3-dev下载的是3.2.9版本,
而目前很多的软件包都需要eigen3.3.0及以上的版本,因此需要升级eigen3,下载地址为:http://eigen.tuxfamily.org/index.php?title=Main_Page
,本文下载的是eigen3.3.5版本,下载完成进入到eigen目录下,安装步骤:
mkdir build
cd build
cmake …
sudo make install
sudo ldconfig -v
# 安装本身是十分简单的
git clone https://gitee.com/lookinz/Sophus.git
cd [ path-to-sophus ]
mkdir build
cd build
cmake ..
make
sudo make install
git clone https://gitee.com/lookinz/Sophus.git // 首先下载代码仓库
cd Sophus
git checkout a621ff
cd [ path-to-sophus ]
mkdir build
cd build
cmake ..
make
sudo make install