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

后端 未结 8 812
滥情空心
滥情空心 2021-02-05 07:06

I use gsl. After I compiled my .cpp file and run it, I faced with below error:

error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such

8条回答
  •  借酒劲吻你
    2021-02-05 07:46

    In my experience, fastStructure depends on gsl 1.6 but not the latest version.

    wget http://gnu.mirror.vexxhost.com/gsl/gsl-1.6.tar.gz
    tar -zxvf gsl-1.6.tar.gz
    cd gsl-1.16
    ./configure
    make
    sudo make install
    

    Add these lines to your .bashrc file on your home directory.

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export CFLAGS="-I/usr/local/include"
    export LDFLAGS="-L/usr/local/lib"
    

    then, run source ~/.bashrc to set these environment variables.

    It works fine when I change the version from the latest to the 1.6.

提交回复
热议问题