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

libRlapack.so: cannot open shared object file: No such file or directory #389

Open
danli349 opened this issue Mar 27, 2024 · 2 comments
Open

Comments

@danli349
Copy link

danli349 commented Mar 27, 2024

Hello

When I build rMATS by ./build_rmats --conda:

** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/lila/home/lid/R/x86_64-pc-linux-gnu-library/4.0/Matrix/libs/Matrix.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 ‘mixtools’
* removing ‘/lila/home/lid/R/x86_64-pc-linux-gnu-library/4.0/mixtools’
* restoring previous ‘/lila/home/lid/R/x86_64-pc-linux-gnu-library/4.0/mixtools’

The downloaded source packages are in
        ‘/tmp/RtmpLY8Acf/downloaded_packages’
Loading required package: mixtools
Error: package or namespace load failed for ‘mixtools’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/lila/home/lid/R/x86_64-pc-linux-gnu-library/4.0/Matrix/libs/Matrix.so':
  libRlapack.so: cannot open shared object file: No such file or directory
Error: could not install mixtools
In addition: Warning message:
In install.packages(package$name, repos = repos) :
  installation of package ‘mixtools’ had non-zero exit status
Execution halted

The mixtools package is already installed:

> library(mixtools)
mixtools package, version 2.0.0, Released 2022-12-04
This package is based upon work supported by the National Science Foundation under Grant No. SES-0518772 and the Chan Zuckerberg Initiative: Essential Open Source Software for Science (Grant No. 2020-255193).
Rscript -e 'sessionInfo()'
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /admin/opt/common/CentOS_7/R/R-4.2.0/lib64/R/lib/libRblas.so
LAPACK: /admin/opt/common/CentOS_7/R/R-4.2.0/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.2.0

How should I solve this problem?
Thanks

@EricKutschera
Copy link
Contributor

./build_rmats --conda should create a conda environment in ./conda_envs/rmats where any R packages should get installed. Your output shows it trying to load a shared object from some other path: /lila/home/lid/R/x86_64-pc-linux-gnu-library/4.0/Matrix/libs/Matrix.so. For an install I did I found that file at ./conda_envs/rmats/lib/R/library/Matrix/libs/Matrix.so

Also ./build_rmats --conda should install the mixtools package from conda https://github.com/Xinglab/rmats-turbo/blob/v4.3.0/darts_model_conda_requirements.txt#L5

But based on that output it looks like it may be installing it from CRAN because it didn't find mixtools here: https://github.com/Xinglab/rmats-turbo/blob/v4.3.0/install_r_deps.R#L41

Potentially R is looking in the wrong place for libraries due to environment variables (R_LIBS_SITE, R_LIBS_USER, R_LIBS) or config files (~/.Renviron, ~/.Rprofile): https://stackoverflow.com/questions/24387660/how-to-change-libpaths-permanently-in-r

@danli349
Copy link
Author

@EricKutschera I removed my ~/.Rprofile file and this problem was resolved.
Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants