问题
I had GSL (Gnu Scientific library) installed on my Ubuntu 14.04 and it was working fine. I then upgraded to Ubuntu 16.04 and now if I try to compile C++ code using GSL I obtain the error message
g++ -c FILE.cpp
In file included from FILE.cpp:1:0:
FILE.h:3:28: fatal error: gsl/gsl_matrix.h: No such file or directory
compilation terminated.
Makefile:42: recipe for target 'FILE.o' failed
make: *** [FILE.o] Error 1
How do I fix this issue?
回答1:
The upgrade appears to have removed older packages. You will need to re-install them from the repository. The command apt-cache search gsl
includes the following relevant packages:
libgsl-dev - GNU Scientific Library (GSL) -- development package
libgsl2 - GNU Scientific Library (GSL) -- library package
gsl-bin - GNU Scientific Library (GSL) -- binary package
Since you're doing dev work, you should install libgsl-dev
.
来源:https://stackoverflow.com/questions/46200312/gnu-scientific-library-stopped-working-in-ubuntu-16-04