The installaltion of "gsl" on "CentOS 7"

Here is the problems I meet and the solutions I see from other pepople. Just a note!

  • first, download gsl-2.1.tar.gz from gslnet.
  • unpackage it: $ tar -xzvf gsl-2.1.tar.gz.
  • get into the file $ cd gsl-2.1
  • compile it $ ./configure --prefix=/usr/local/gsl
  • install it $sudo make && make check && make install
  • edit the the path in .barsrccd ~ and vi .barsrc
  • added in

#___ gsl ___

export PATH=/usr/local/gsl/bin:${PATH}

export C_INCLUDE_PATH=/usr/local/gsl/include:${C_INCLUDE_PATH}

export LD_LIBRARY_PATH=/usr/local/gsl/lib:${LD_LIBRARY_PATH}

  • complete

solution to cannot find -lxxx


I have installed the gsl library on my CentOS 7 computer and complete it. However, when I use gcc to compile a program, in which it calls gsl to do some calculation, I have suffered


/usr/bin/ld: cannot find -lgsl

/usr/bin/ld: cannot find -lgslcblas

I checked my lib in /usr/lib, and find there is no libgsl* exit. For -lxxx represent 'lib+xxx+.so'.

Then I checked my computer: $ find / -name libgsl.so

I find the file in /usr/local/gsl/lib/libgsl.so, where I installed the gsl.

Then I linked it to /usr/lib


$ sudo ln -s /usr/loca/gsl/lib/libgsl.so /usr/lib/

The same to solve some same problems, maybe, I think.

The end!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,786评论 0 23
  • 小时候上学 我一直觉得自己是全班最笨的小孩 因为我有很多不懂,老是不懂 老师有时讲很多遍我还是会抓住细枝末节继续质...
    鲸荔阅读 282评论 0 2
  • 文字的研究在闲得无事的时候,还是很有意思的。在中国号称“小学”。跟佛教里的大乘小乘差不多的意思。
    无叹轩阅读 340评论 0 0