- 安装依赖
sudo apt-get install libopenblas-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev doxygen cmake
- 下载源码
https://gitlab.com/libeigen/eigen/-/releases
sudo wget https://github.com/eigenteam/eigen-git-mirror/archive/3.3.5.tar.gz
- 编译
sudo tar -xzvf 3.3.5.tar.gz
sudo mv eigen-git-mirror-3.3.5/ eigen-3.3.5/
cd eigen-3.3.5/
mkdir build
cd build
cmake ..
make
sudo make install
sudo cp -r /usr/local/include/eigen3/Eigen /usr/local/include
- 版本查看
Eigen的版本可以在 /usr/local/include/eigen3/Eigen/src/Core/util/Macros.h 中查看,
cat /usr/local/include/eigen3/Eigen/src/Core/util/Macros.h | head -n 16 | tail -n +14
如下所示版本为3.3.5。