Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to create symbolic link '/lib/libcuda.so': Permission denied #97

Open
1 task done
CoconutSweet999 opened this issue May 11, 2023 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@CoconutSweet999
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

A non-root user of the server tries “ conda install” command and receives the following error:
ln: failed to create symbolic link '/lib/libcuda.so': Permission denied
what can I do?
Thanks!

Installed packages

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
blas                      1.0                         mkl  
brotlipy                  0.7.0           py311h5eee18b_1002  
bzip2                     1.0.8                h7b6447c_0  
ca-certificates           2023.01.10           h06a4308_0  
certifi                   2022.12.7       py311h06a4308_0  
cffi                      1.15.1          py311h5eee18b_3  
charset-normalizer        2.0.4              pyhd3eb1b0_0  
cryptography              39.0.1          py311h9ce1e76_0  
cuda-cudart               11.8.89                       0    nvidia
cuda-cupti                11.8.87                       0    nvidia
cuda-libraries            11.8.0                        0    nvidia
cuda-nvrtc                11.8.89                       0    nvidia
cuda-nvtx                 11.8.86                       0    nvidia
cuda-runtime              11.8.0                        0    nvidia
ffmpeg                    4.3                  hf484d3e_0    pytorch
filelock                  3.9.0           py311h06a4308_0  
freetype                  2.12.1               h4a9f257_0  
giflib                    5.2.1                h5eee18b_3  
gmp                       6.2.1                h295c915_3  
gmpy2                     2.1.2           py311hc9b5ff0_0  
gnutls                    3.6.15               he1e5248_0  
idna                      3.4             py311h06a4308_0  
intel-openmp              2023.1.0         hdb19cb5_46305  
jinja2                    3.1.2           py311h06a4308_0  
jpeg                      9e                   h5eee18b_1  
lame                      3.100                h7b6447c_0  
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.38                 h1181459_1  
lerc                      3.0                  h295c915_0  
libcublas                 11.11.3.6                     0    nvidia
libcufft                  10.9.0.58                     0    nvidia
libcufile                 1.6.1.9                       0    nvidia
libcurand                 10.3.2.106                    0    nvidia
libcusolver               11.4.1.48                     0    nvidia
libcusparse               11.7.5.86                     0    nvidia
libdeflate                1.17                 h5eee18b_0  
libffi                    3.4.4                h6a678d5_0  
libgcc-ng                 11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libiconv                  1.16                 h7f8727e_2  
libidn2                   2.3.2                h7f8727e_0  
libnpp                    11.8.0.86                     0    nvidia
libnvjpeg                 11.9.0.86                     0    nvidia
libpng                    1.6.39               h5eee18b_0  
libstdcxx-ng              11.2.0               h1234567_1  
libtasn1                  4.19.0               h5eee18b_0  
libtiff                   4.5.0                h6a678d5_2  
libunistring              0.9.10               h27cfd23_0  
libuuid                   1.41.5               h5eee18b_0  
libwebp                   1.2.4                h11a3e52_1  
libwebp-base              1.2.4                h5eee18b_1  
lz4-c                     1.9.4                h6a678d5_0  
markupsafe                2.1.1           py311h5eee18b_0  
mkl                       2023.1.0         h6d00ec8_46342  
mkl-service               2.4.0           py311h5eee18b_1  
mkl_fft                   1.3.6           py311ha02d727_1  
mkl_random                1.2.2           py311ha02d727_1  
mpc                       1.1.0                h10f8cd9_1  
mpfr                      4.0.2                hb69a4c5_1  
mpmath                    1.2.1           py311h06a4308_0  
ncurses                   6.4                  h6a678d5_0  
nettle                    3.7.3                hbbd107a_1  
networkx                  2.8.4           py311h06a4308_1  
numpy                     1.24.3          py311h08b1b3b_1  
numpy-base                1.24.3          py311hf175353_1  
nvcc_linux-64             10.1                hcaf9a05_10  
openh264                  2.1.1                h4ff587b_0  
openssl                   1.1.1t               h7f8727e_0  
pillow                    9.4.0           py311h6a678d5_0  
pip                       23.0.1          py311h06a4308_0  
pycparser                 2.21               pyhd3eb1b0_0  
pyopenssl                 23.0.0          py311h06a4308_0  
pysocks                   1.7.1           py311h06a4308_0  
python                    3.11.3               h7a1cb2a_0  
pytorch                   2.0.1           py3.11_cuda11.8_cudnn8.7.0_0    pytorch
pytorch-cuda              11.8                 h7e8668a_5    pytorch
pytorch-mutex             1.0                        cuda    pytorch
readline                  8.2                  h5eee18b_0  
requests                  2.29.0          py311h06a4308_0  
setuptools                66.0.0          py311h06a4308_0  
sqlite                    3.41.2               h5eee18b_0  
sympy                     1.11.1          py311h06a4308_0  
tbb                       2021.8.0             hdb19cb5_0  
tk                        8.6.12               h1ccaba5_0  
torchaudio                2.0.2               py311_cu118    pytorch
torchtriton               2.0.0                     py311    pytorch
torchvision               0.15.2              py311_cu118    pytorch
typing_extensions         4.5.0           py311h06a4308_0  
tzdata                    2023c                h04d1e81_0  
urllib3                   1.26.15         py311h06a4308_0  
wheel                     0.38.4          py311h06a4308_0  
xz                        5.4.2                h5eee18b_0  
zlib                      1.2.13               h5eee18b_0  
zstd                      1.5.5                hc292b87_0

Environment info

active environment : lanegcn
    active env location : /home/xcc/anaconda3/envs/lanegcn
            shell level : 2
       user config file : /home/xcc/.condarc
 populated config files : 
          conda version : 23.1.0
    conda-build version : 3.23.3
         python version : 3.10.9.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.31=0
                          __linux=5.15.0=0
                          __unix=0=0
       base environment : /home/xcc/anaconda3  (writable)
      conda av data dir : /home/xcc/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/xcc/anaconda3/pkgs
                          /home/xcc/.conda/pkgs
       envs directories : /home/xcc/anaconda3/envs
                          /home/xcc/.conda/envs
               platform : linux-64
             user-agent : conda/23.1.0 requests/2.28.1 CPython/3.10.9 Linux/5.15.0-69-generic ubuntu/20.04.4 glibc/2.31
                UID:GID : 1005:1005
             netrc file : None
           offline mode : False
@CoconutSweet999 CoconutSweet999 added the bug Something isn't working label May 11, 2023
@jakirkham
Copy link
Member

jakirkham commented May 11, 2023

What is echo "${CONDA_PREFIX}"? IOW have they activated the environment before installing?

@jakirkham
Copy link
Member

Basically something is going wrong in this code path:

# Add $(libcuda.so) shared object stub to the compiler sysroot.
# Needed for things that want to link to $(libcuda.so).
# Stub is used to avoid getting driver code linked into binaries.
if [[ ! -z "${CONDA_BUILD_SYSROOT+x}" ]]
then
mkdir -p "${CONDA_BUILD_SYSROOT}/lib"
# Make a backup of $(libcuda.so)
LIBCUDA_SO_CONDA_NVCC_BACKUP="${CONDA_BUILD_SYSROOT}/lib/libcuda.so-conda-nvcc-backup"
if [[ -f "${CONDA_BUILD_SYSROOT}/lib/libcuda.so" ]]
then
mv -f "${CONDA_BUILD_SYSROOT}/lib/libcuda.so" "${LIBCUDA_SO_CONDA_NVCC_BACKUP}"
fi
ln -s "${LIBCUDA_STUB_FILE}" "${CONDA_BUILD_SYSROOT}/lib/libcuda.so"
else
mkdir -p "${CONDA_PREFIX}/lib/stubs"
ln -sf "${LIBCUDA_STUB_FILE}" "${CONDA_PREFIX}/lib/stubs/libcuda.so"
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants