4

I am trying to install a statistical program which requires GNU Scientific Library (GSL). I have successfully installed GSL through the yum command, but my statistical program gives an error when I try to run make install. I think there is a linking problem. How can I solve it?

$ sudo yum install gsl.x86_64
Installed:
  gsl.x86_64 0:1.15-3.fc16
Dependency Installed:
  atlas.x86_64 0:3.8.4-1.fc16
$ tar -xvzf prog.tgz
$ cd prog
$ make
$ gcc -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/opt/local/include/ -L/opt/local/lib/     -c -o prog.o prog.c
In file included from prog.c:16:0:
prog.h:7:30: fatal error: gsl/gsl_sf_gamma.h: No such file or directory
compilation terminated.
make: *** [prog.o] Error 1

2 Answers 2

3

This looks to me like you have installed the library binaries, but not the headers and other supplementary files needed for "development" (which includes simply compiling ready-made applications that make use of the library).

Look for packages with names like gsl-dev, gsl-headers and the likes. Those (-dev etc.) usually contain the files needed to compile software against the library in question. Install the appropriate package and try again.

Also, look for an INSTALL, BUILD (or similar) file in the source code tree. Usually there is a configure step which you are eliding in the set of commands you list in your post.

7

on Centos 6.5 :

yum install gsl-devel

This worked for me.

2
  • 1
    Works on Amazon Linux AMIs as well.
    – CodeOcelot
    Mar 23, 2016 at 17:21
  • And RedHat Enterprise Linux 7.6
    – kto
    Nov 18, 2019 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .