gsl: make file not linking, /usr/bin/ld: cannot find -lgsl

I am getting following error on linux server

gcc -m64 -O3 /export/projects/EL/mlml21/gsl-1.16/.libs/libgsl.a /export/projects/EL/mlml21/gsl-1.16/cblas/.libs/libgslcblas.a -I/export/projects/EL/mlml21/gsl-1.16 -std=c99 -o em em.c data.c prob_functions.c -lgsl -lgslcblas -lm /usr/bin/ld: cannot find -lgsl collect2: ld returned 1 exit status make: *** [em] Error 1'

by running the following makefile

default: em em_mex clean: ` rm -f *.o em

CBLAS_LIB=/export/projects/EL/mlml21/gsl-1.16/cblas/.libs GSL_LIB=/export/projects/EL/mlml21/gsl-1.16/.libs GSL_INCLUDE=/export/projects/EL/mlml21/gsl-1.16 MATLAB=/usr/local/R2013a em_mex: em_mex.c em.c data.c data.h prob_functions.c prob_functions.h $(MATLAB)/bin/mex $(GSL_LIB)/libgsl.a $(CBLAS_LIB)/libgslcblas.a -I$(GSL_INCLUDE) -arch=linux em_mex.c em.c data.c prob_functions.c

em: em.c data.c data.h prob_functions.c prob_functions.h gcc -m64 -O3 $(GSL_LIB)/libgsl.a $(CBLAS_LIB)/libgslcblas.a -I$(GSL_INCLUDE) -std=c99 -o em em.c data.c prob_functions.c -lgsl -lgslcblas -lm`


Try installing libgs by running:

sudo apt-get install libgsl0-dev

You are compiling your program from source. gcc searches the library named gsl when linking but cannot find gsl on your system. That's the main reason why gcc command failed. Your system does not have gsl installed. Therefore you must install gsl before your program can be compiled. To install gsl, simply run the above command. Hope this helps.

Need Your Help

python:Using split strings

python string split syntax-error

My problem is that I'm trying to modify a word in a file so I look for the word in the file loaded as a string and then rewrite the file with the new word and the split string.Except I can't seem t...

Class instances share the value of a data member

java datamember

I am writting a program to display a list multiple choice questions.I am having a problem with the value stored in the ChoiceString data member of my java class. Each instance of the class should h...