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

Good morning,

Thank you very much for your answer. I did what you said and it worked.

I needed cmake in order to install the RcppPlanc (R package), but it still gives an error when I try to install it from RStudio in the Jupyterhub.
Please find the error (Error 1) bellow.

Afterwards, I realized that RcppPlanc package can be found in /shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2 but I can not load it in RStudio with library(RcppPlanc). Please find the error (Error 2) bellow.

Thank you.
Myrto

Error 1:
install.packages(‘RcppPlanc’, repos =

  •                  'https:/welch-lab.r-universe.dev')
    

Installing package into ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
trying URL ‘https:/welch-lab.r-universe.dev/src/contrib/RcppPlanc_1.0.0.tar.gz’
Content type ‘application/x-gzip’ length 1424040 bytes (1.4 MB)

downloaded 1.4 MB

  • installing source package ‘RcppPlanc’ …
    ** using staged installation
    no ‘cmake’ command found
    ERROR: configuration failed for package ‘RcppPlanc’
  • removing ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/RcppPlanc’
  • restoring previous ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/RcppPlanc’
    Warning in install.packages :
    installation of package ‘RcppPlanc’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmptTj7h0/downloaded_packages’

Error 2:
library(RcppPlanc)
Error: package or namespace load failed for ‘RcppPlanc’ in dyn.load(file, DLLpath = DLLpath, …):
unable to load shared object ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/RcppPlanc/libs/RcppPlanc.so’:
libhdf5_serial.so.103: cannot open shared object file: No such file or directory
In addition: Warning message:
package ‘RcppPlanc’ was built under R version 4.3.3

Hello @MyrMit

I could not replicate your error.

I had to install the openblas library into the R conda environment:

conda install -c conda-forge openblas-devel

However I could not install the “Matrix” R library needed for RcppPlanc. This is the error I got:

> BiocManager::install('Matrix')
...
le package ‘Matrix’ n'est pas disponible for this version of R
‘Matrix’ version 1.7-0 is in the repositories but depends on R (>= 4.4.0)
‘Matrix’ version 1.7-0 is in the repositories but depends on R (>= 4.5)

@Gabriel @Magali @okirsh ça vous dit quelque-chose ?

Good afternoon @rey

Thank you for your answer.
It seems that the problem is that the R version in the server is not updated. Is it possible to update it to the latest version?
I am asking because I have the same problem with another package that also requires R version >= 4.4.0.

Thank you.
Myrto

Hello,

Unfortunatly version 4.4.0 is not yet available as a conda package.

I will ask the IFB if they can help us.

Good afternoon,

I was wondering if we have any news concerning the R version update.

Thank you very much.
Myrto

I am working on it.

Sincerely.

Hello @MyrMit

Just to let you know that I created a R 4.4.0 kernel for jupyterhub.

If everything is ok I may also integrate it into Rstudio.

Good morning @rey,

Thank you very much for the kernel.

I tried to install the Seurat package and I got the following error:

install.packages('Seurat')

Warning message in install.packages("Seurat"):
“'lib = "/shared/software/conda/envs/r-4.4.0-rpbs/lib64/R/library"' is not writable”
Error in install.packages("Seurat"): unable to install packages
Traceback:

1. install.packages("Seurat")
2. stop("unable to install packages")

Hello @MyrMit ,

The /shared/software/conda/envs/r-4.4.0-rpbs/lib64/R/library is not user-writable.

Usually, the R prompt offers to install the library in your user directory (for example: /shared/home/rey/R/x86_64-conda-linux-gnu-library/4.4).

But you can also specify the path in the install.packages() command:
install.packages(“Seurat”, lib = “/shared/home/rey/R/x86_64-conda-linux-gnu-library/4.4”)

Good afternoon,

I accidentally ran install.packages(“Seurat”, lib = “/shared/home/rey/R/x86_64-conda-linux-gnu-library/4.2”) instead of 4.4, which messed up Seurat in RStudio (because RStudio has R version 4.2.3).
I tried to install Seurat again (see bellow) but it didn’t work. How should I proceed?

Thank you in advance.
Myrto

path <- Sys.getenv("PATH")
Sys.setenv(PATH = paste(path, "/shared/software/conda/envs/r-4.2.3/bin", sep = ":"))
install.packages('Seurat')

installing to /shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/00LOCK-Seurat/00new/Seurat/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Warning message:
package ‘sp’ was built under R version 4.4.0 
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/igraph/libs/igraph.so':
  libRlapack.so: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘Seurat’
* removing ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/Seurat’
Warning in install.packages :
  installation of package ‘Seurat’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpaqlDqt/downloaded_packages’

Hello @MyrMit

Out of curiosity, have you tried:

install.packages('igraph')

?

Apologies for the late reply.

Sorry I never saw that.
I installed igraph and some other dependecies and Seurat was able to be installed.
I used to have ‘5.0.3’ but now ‘5.1.0’ was installed.
it has not gave me any problems so far so I will run with that.

Thank you for your help.
Myrto