无sudo权限在RHEL7安装Bazel时遇libisl.so.15无法加载问题求助
Hey there, let's work through this libisl.so.15 issue you're hitting when setting up Bazel on RHEL 7—since you don't have sudo privileges, we'll focus on user-space solutions you can implement yourself:
Verify the library's actual path and permissions
First, confirm where the symbolic link points and that you have access to it. Run these commands, replacing/path/to/libisl.so.15with the actual path of your symlink:readlink -f /path/to/libisl.so.15 ls -l /path/to/libisl.so.15Make sure the target file listed exists, and that you have read permissions for both the symlink and the actual library file. If permissions are restricted, you might need to ask your admin for read access, or if you downloaded the library yourself, ensure the directory it's in allows read access.
Temporarily set LD_LIBRARY_PATH
The most immediate fix is to add the directory containing libisl.so.15 to your dynamic linker path. Replace/path/to/libisl_dirwith the directory holding the library (you can get this from thereadlinkoutput):export LD_LIBRARY_PATH=/path/to/libisl_dir:$LD_LIBRARY_PATHNow try running your Bazel build command again. To make this permanent (so you don't have to run it every time), add the line to your shell profile:
echo 'export LD_LIBRARY_PATH=/path/to/libisl_dir:$LD_LIBRARY_PATH' >> ~/.bashrc source ~/.bashrc(Use
~/.zshrcinstead if you use Zsh.)Compile Bazel with rpath embedded
If you're building Bazel from source, you can configure it to include the library path directly in the executable. When running the./configurestep, add this flag:./configure --linkopt=-Wl,-rpath=/path/to/libisl_dirThis tells the linker to hardcode the library path into Bazel, so it will always find libisl.so.15 without needing environment variables.
Use a statically compiled Bazel binary
Static builds of Bazel don't rely on system shared libraries like libisl. Look for a statically linked binary in the official Bazel releases (look for labels likestaticor binaries that don't list libisl as a dependency). Download it, make it executable withchmod +x bazel-static, and use that version instead—this can bypass the shared library issue entirely.
内容的提问来源于stack exchange,提问作者Vignesh K

