gcc unable to find shared library libisl.so

跟風遠走 提交于 2020-04-10 02:14:31

问题


I installed gcc version 5.1 locally on a cluster having OS as CentOS where I dont have root access (so i cant use any commands like 'sudo'). (The global gcc version installed is 4.4). I also modified the path variable to include the path to my local version at the beginning of the path variable. Before, when I was trying to install boost using the global version, it worked fine. But now, when I try to install boost, it shows the following error:

/users/home/head/cmp/soft/sft/gcc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory

Any ideas on how to fix this will be highly appreciated.


回答1:


Follow the instructions at https://gcc.gnu.org/wiki/InstallingGCC

Specifically, don't install ISL manually in some non-standard path, because GCC needs to find its shared libraries at run-time.

The simplest solution is to use the download_prerequisites script to add the GMP, MPFR, MPC and ISL source code to the GCC source tree, which will cause GCC to build them for you automatically, and link to them statically.




回答2:


I have the same issue. I solved it as follows:

  1. Download the source code of isl available here

  2. Unzip and install: ./configure && make && make install

  3. cp /usr/local/lib/libisl* /usr/lib

    • Note: a symlink also works:

      $ cd /usr/lib

      $ ln -s /usr/local/lib/libisl.so.10 libisl.so.10

  4. You can do the same in Debian distros:

    apt-get install libisl-dev

  5. Adjust the references of shared libs:

    $ cp /usr/local/lib/libisl* /usr/lib

    • Note: a symlink also works:

      $ cd /usr/lib

      $ ln -s /usr/local/lib/libisl.so.10 libisl.so.10



来源:https://stackoverflow.com/questions/33734143/gcc-unable-to-find-shared-library-libisl-so

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!