Error while loading shared libraries: libgsl. so.0: cannot open shared object file: no such file or directory not found in the dynamic link library

Source: Internet
Author: User

Problem:

Run the GSL (GNU Scientific Library) function library

Gcc erf. c-I/usr/local/include-L/usr/local/lib64-L/usr/local/lib-g-wall -- STD = gnu99-lgsl-lgslcblas-o m. O

Compile and run./m. o

Error while loading shared libraries: libgsl. so.0: cannot open shared object file: no such file or directory

 

Solution:

Under Shell

LDD m. o

Output:

~ /Test/C $ LDD m. o
Linux-vdso.so.1 => (0x00007fff3d5ff000)
Libgsl. so.0 => not found
Libgslcblas. so.0 => not found
Libc. so.6 =>/lib64/libc. so.6 (0x00007f7420c3b000)
/Lib64/ld-linux-x86-64.so.2 (0x00007f7420fdd000)

Libgsl and libgslcblas. So cannot be found

 

Sudo ldconfig

The role of ldconfig is: Configure dynamic linker Run Time Bindings.

Then run LDD m. o again

~ /Test/C $ LDD m. o
Linux-vdso.so.1 => (0x00007fff62bad000)
Libgsl. so.0 =>/usr/local/lib/libgsl. so.0 (0x00007f6968a01000)
Libgslcblas. so.0 =>/usr/local/lib/libgslcblas. so.0 (0x00007f69687ce000)
Libc. so.6 =>/lib64/libc. so.6 (0x00007f6968439000)
Libm. so.6 =>/lib64/libm. so.6 (0x00007f69681b5000)

Run successfully

 

Cause:

After installing GSL, the dynamic link library of GSL cannot be identified because it is not refreshed in time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.