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,828評論 0 23
  • 小時候上學 我一直覺得自己是全班最笨的小孩 因為我有很多不懂,老是不懂 老師有時講很多遍我還是會抓住細枝末節繼續質...
    鯨荔閱讀 282評論 0 2
  • 文字的研究在閑得無事的時候,還是很有意思的。在中國號稱“小學”。跟佛教里的大乘小乘差不多的意思。
    無嘆軒閱讀 340評論 0 0