I'm getting an error while installing Caffe2. After the succesful build, in the sudo make install step, it throws an error as #error Caffe2 requires Eigen to be at least 3.3.0
-
And what is your question? – chtz Mar 03 '18 at 20:34
-
@chtz I think you are happy now. – doruk.sonmez Mar 04 '18 at 20:40
1 Answers
The solution is:
- Check the Eigen version with:
cat /usr/include/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION
It will show some version variable values like below:
EIGEN_WORLD_VERSION 3
EIGEN_MAJOR_VERSION 2
EIGEN_MINOR_VERSION 192
These values are telling your problem directly. Your Eigen version is 3.2.192 instead of 3.3.0. So we need to upgrade this package.
Install the latest version of eigen from http://eigen.tuxfamily.org/index.php?title=Main_Page .
Extract the file wherever you want and rename it to
eigen3
.cd /usr/include
sudo rm -rf eigen3/
Place the file you just extracted with
sudo mv path/of/eigen3 /usr/include/
Lastly check the version again with
cat /usr/include/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION
You should see these variables:
EIGEN_WORLD_VERSION 3
EIGEN_MAJOR_VERSION 3
EIGEN_MINOR_VERSION 4
You can run sudo make install
again in the caffe2
directory and you will see that everything will be installed succesfully!

- 397
- 2
- 5
- 14
-
2I would generally advise against overriding the contents of `/usr/include` (this may or may not be overridden by the OS at any update). Rather put a new version into `/usr/local/include` -- this has to be found by caffe2 then, of course. – chtz Mar 07 '18 at 07:38