CMake installation error in the conda-forge channel

Good afternoon,

I need to install the CMake package in order to run some commands from the liger package in RStudio. I found that the CMake package is available in the conda-forge channel, but when I tried to install it I got a “permission denied” error.
Please find the error bellow.

Thank you in advance.
Myrto Mitletton

(base) [mitletton@ipop-up myrto]$ conda install -c conda-forge cmake
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
current version: 23.1.0
latest version: 24.3.0

Please update conda by running

$ conda update -n base -c defaults conda

Or to minimize the number of packages updated during conda update use

 conda install conda=24.3.0

Package Plan

environment location: /opt/conda

added / updated specs:
- cmake

The following NEW packages will be INSTALLED:

_openmp_mutex pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu
c-ares pkgs/main/linux-64::c-ares-1.19.1-h5eee18b_0
cmake pkgs/main/linux-64::cmake-3.26.4-h96355d8_0
expat pkgs/main/linux-64::expat-2.5.0-h6a678d5_0
krb5 pkgs/main/linux-64::krb5-1.20.1-h143b758_1
libcurl pkgs/main/linux-64::libcurl-8.5.0-h251f7ec_0
libedit pkgs/main/linux-64::libedit-3.1.20230828-h5eee18b_0
libev conda-forge/linux-64::libev-4.33-h516909a_1
libgomp pkgs/main/linux-64::libgomp-11.2.0-h1234567_1
libnghttp2 pkgs/main/linux-64::libnghttp2-1.57.0-h2d74bed_0
libssh2 pkgs/main/linux-64::libssh2-1.10.0-hdbd6064_2
libuv pkgs/main/linux-64::libuv-1.44.2-h5eee18b_0
lz4-c pkgs/main/linux-64::lz4-c-1.9.4-h6a678d5_0
rhash pkgs/main/linux-64::rhash-1.4.3-hdbd6064_0
zstd pkgs/main/linux-64::zstd-1.5.5-hc292b87_0

The following packages will be UPDATED:

ca-certificates pkgs/main::ca-certificates-2023.01.10~ → conda-forge::ca-certificates-2024.2.2-hbcca054_0
certifi pkgs/main/linux-64::certifi-2022.12.7~ → conda-forge/noarch::certifi-2024.2.2-pyhd8ed1ab_0
libffi pkgs/main::libffi-3.3-he6710b0_2 → conda-forge::libffi-3.4.2-h7f98852_5
libgcc-ng 9.1.0-hdf63c60_0 → 11.2.0-h1234567_1
libstdcxx-ng pkgs/main::libstdcxx-ng-9.1.0-hdf63c6~ → conda-forge::libstdcxx-ng-13.2.0-h7e041cc_5
libuuid 1.0.3-h7f8727e_2 → 1.41.5-h5eee18b_0
ncurses 6.3-h7f8727e_2 → 6.4-h6a678d5_0
openssl 1.1.1t-h7f8727e_0 → 3.0.13-h7f8727e_0
python 3.10.4-h12debd9_0 → 3.10.14-h955ad1f_0
sqlite 3.38.5-hc218d9a_0 → 3.41.2-h5eee18b_0
xz 5.2.5-h7f8727e_1 → 5.4.6-h5eee18b_0
zlib 1.2.12-h7f8727e_2 → 1.2.13-h5eee18b_0

Proceed ([y]/n)? y

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: failed

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/conda/exceptions.py", line 1124, in __call__
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/conda/cli/main.py", line 69, in main_subshell
    exit_code = do_call(args, p)
  File "/opt/conda/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 91, in do_call
    return getattr(module, func_name)(args, parser)
  File "/opt/conda/lib/python3.10/site-packages/conda/notices/core.py", line 109, in wrapper
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/conda/cli/main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "/opt/conda/lib/python3.10/site-packages/conda/cli/install.py", line 332, in install
    handle_txn(unlink_link_transaction, prefix, args, newenv)
  File "/opt/conda/lib/python3.10/site-packages/conda/cli/install.py", line 361, in handle_txn
    unlink_link_transaction.execute()
  File "/opt/conda/lib/python3.10/site-packages/conda/core/link.py", line 282, in execute
    self.verify()
  File "/opt/conda/lib/python3.10/site-packages/conda/common/io.py", line 84, in decorated
    return f(*args, **kwds)
  File "/opt/conda/lib/python3.10/site-packages/conda/core/link.py", line 243, in verify
    exceptions = self._verify(self.prefix_setups, self.prefix_action_groups)
  File "/opt/conda/lib/python3.10/site-packages/conda/core/link.py", line 637, in _verify
    for exc in self.verify_executor.map(UnlinkLinkTransaction._verify_individual_level,
  File "/opt/conda/lib/python3.10/site-packages/conda/common/io.py", line 547, in map
    yield func(thing)
  File "/opt/conda/lib/python3.10/site-packages/conda/core/link.py", line 454, in _verify_individual_level
    error_result = axn.verify()
  File "/opt/conda/lib/python3.10/site-packages/conda/core/path_actions.py", line 475, in verify
    mkdir_p(self.transaction_context["temp_dir"])
  File "/opt/conda/lib/python3.10/site-packages/conda/gateways/disk/__init__.py", line 66, in mkdir_p
    os.makedirs(path)
  File "/opt/conda/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/opt/conda/.condatmp'

$ /opt/conda/bin/conda install -c conda-forge cmake

environment variables:
CIO_TEST=
CONDA_DEFAULT_ENV=base
CONDA_EXE=/opt/conda/bin/conda
CONDA_PREFIX=/opt/conda
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/opt/conda/bin/python
CONDA_ROOT=/opt/conda
CONDA_SHLVL=1
CURL_CA_BUNDLE=
LD_PRELOAD=
MODULEPATH=/shared/software/modulefiles
PATH=/opt/conda/bin:/opt/conda/condabin:/opt/status_bars/status_bars:/usr/l
ocal/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/shared/home/mitletton/.lo
cal/bin:/shared/home/mitletton/bin
REQUESTS_CA_BUNDLE=
SSL_CERT_FILE=
STATUS_BAR_CONF_PATH=/opt/status_bars/etc/conf.sh

 active environment : base
active env location : /opt/conda
        shell level : 1
   user config file : /shared/home/mitletton/.condarc

populated config files : /shared/home/mitletton/.condarc
conda version : 23.1.0
conda-build version : not installed
python version : 3.10.4.final.0
virtual packages : __archspec=1=x86_64
__glibc=2.17=0
__linux=3.10.0=0
__unix=0=0
base environment : /opt/conda (writable)
conda av data dir : /opt/conda/etc/conda
conda av metadata url : None

      package cache : /shared/projects/compdevneuro/conda/pkgs
   envs directories : /shared/projects/compdevneuro/conda/env
                      /opt/conda/envs
                      /shared/home/mitletton/.conda/envs
           platform : linux-64
         user-agent : conda/23.1.0 requests/2.28.1 CPython/3.10.4 Linux/3.10.0-1160.92.1.el7.x86_64 centos/7.9.2009 glibc/2.17
            UID:GID : 2140:2002
         netrc file : None
       offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

Hello,

You are trying to install a conda package into the (base) environment which requires superuser rights.

You must create a new environment in your project directory this way:

conda create -c conda-forge -p /shared/projects/compdevneuro/envs/cmake cmake

Then, just specify the full path to the environment to activate it:

conda activate /shared/projects/compdevneuro/envs/cmake