How to install eigen 3.3 in Ubuntu 14.04?
Solution 1:
For those simply requiring a reasonably recent version of Eigen 3 on Ubuntu and similar Debian-based distros (...which is the common case), installing the existing libeigen3-dev
package suffices: e.g.,
sudo apt install libeigen3-dev
Manually downloading and installing Eigen 3 is probably overkill for most use cases.
Solution 2:
Eigen c++ is a header only library: you don't have to install it, you just download it, unzip it and link your code against it.
For example, if your code is in my_favorite_cpp_folder
, you do:
cd my_favorite_cpp_folder
and, assuming your compiler is gcc
and the eigen headers are in
/usr/local/include/eigen3/unsupported/
and the name of your source file
is my_favorite_cpp_source_file.cpp
, you compile and code and link it to the eigen headers by doing:
g++ -I /usr/local/include/eigen3/ my_favorite_cpp_source_file.cpp -o my_favorite_cpp_source_file
(from your code output posted above, the eigen headers are in /usr/local/include/eigen3/
in your computer)
Solution 3:
dpkg
only knows about software that you have installed by Ubuntu's standard package management tools. But that's not how you installed eigen.
You have installed from the source code, and as such dpkg
doesn't know it. The output of dpkg -p libeigen3-dev
is not about the eigen that you installed, but about a different version of eigen, installed using the standard package management tools.
Based on your output of sudo make install
,
the version of eigen that you installed from source is ready to use,
its files are available in /usr/local/include/eigen3/unsupported/Eigen/src
.