statOmics / msqrob2

Implementation of the MSqRob analysis of differentially expressed proteins using the Features infrastructure
9 stars 10 forks source link

installation issue with dependancies #34

Closed PB-Shinde closed 2 years ago

PB-Shinde commented 2 years ago

I have R versiion 4.1.3 and biocManager3.14, I am trying to install msqrob2 but it gives me error about dependancy 'nlme4' and 'nloptr'. they cannot be installed via install.packages() command too.

> if(!requireNamespace("BiocManager", quietly = TRUE)) {
 install.packages("BiocManager")
}
BiocManager::install("statOmics/msqrob2")
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cloud.r-project.org

Bioconductor version 3.14 (BiocManager 1.30.17), R 4.1.3 (2022-03-10)
Installing github package(s) 'statOmics/msqrob2'
Downloading GitHub repo statOmics/msqrob2@HEAD
Installing 2 packages: nloptr, lme4
trying URL 'https://cloud.r-project.org/src/contrib/nloptr_2.0.0.tar.gz'
Content type 'application/x-gzip' length 2219414 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-29.tar.gz'
Content type 'application/x-gzip' length 3306026 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

ERROR: failed to lock directory ‘/usr/local/lib/R/site-library’ for modifying
Try removing ‘/usr/local/lib/R/site-library/00LOCK-nloptr’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/usr/local/lib/R/site-library/lme4’

The downloaded source packages are in
    ‘/tmp/RtmpZOl5Hh/downloaded_packages’
✔  checking for file ‘/tmp/RtmpZOl5Hh/remotes53a156c75105/statOmics-msqrob2-a7c68aa/DESCRIPTION’ ...
─  preparing ‘msqrob2’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘msqrob2_1.3.0.tar.gz’

ERROR: dependency ‘lme4’ is not available for package ‘msqrob2’
* removing ‘/usr/local/lib/R/site-library/msqrob2’
Warning messages:
1: In i.p(...) : installation of package ‘nloptr’ had non-zero exit status
2: In i.p(...) : installation of package ‘lme4’ had non-zero exit status
3: In i.p(...) :
  installation of package ‘/tmp/RtmpZOl5Hh/file53a143e6715e/msqrob2_1.3.0.tar.gz’ had non-zero exit status
> install.packages("lme4")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependency ‘nloptr’

trying URL 'https://cloud.r-project.org/src/contrib/nloptr_2.0.0.tar.gz'
Content type 'application/x-gzip' length 2219414 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-29.tar.gz'
Content type 'application/x-gzip' length 3306026 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

ERROR: failed to lock directory ‘/usr/local/lib/R/site-library’ for modifying
Try removing ‘/usr/local/lib/R/site-library/00LOCK-nloptr’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/usr/local/lib/R/site-library/lme4’

The downloaded source packages are in
    ‘/tmp/RtmpZOl5Hh/downloaded_packages’
Warning messages:
1: In install.packages("lme4") :
  installation of package ‘nloptr’ had non-zero exit status
2: In install.packages("lme4") :
  installation of package ‘lme4’ had non-zero exit status
ococrook commented 2 years ago

Could you start a clean session, and try to install 'nloptr' fresh? Could you also print your 'sessionInfo'?

PB-Shinde commented 2 years ago

Thank you.. I will try

PB-Shinde commented 2 years ago

I tried doing it again, the issue is with "nloptr" package, here is the error

> if(!requireNamespace("BiocManager", quietly = TRUE)) {
+  install.packages("BiocManager")
+ }
> BiocManager::install("statOmics/msqrob2")
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cloud.r-project.org

Bioconductor version 3.14 (BiocManager 1.30.17), R 4.1.3 (2022-03-10)
Installing github package(s) 'statOmics/msqrob2'
Downloading GitHub repo statOmics/msqrob2@HEAD
Installing 2 packages: nloptr, lme4
trying URL 'https://cloud.r-project.org/src/contrib/nloptr_2.0.0.tar.gz'
Content type 'application/x-gzip' length 2219414 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-29.tar.gz'
Content type 'application/x-gzip' length 3306026 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

ERROR: failed to lock directory ‘/usr/local/lib/R/site-library’ for modifying
Try removing ‘/usr/local/lib/R/site-library/00LOCK-nloptr’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/usr/local/lib/R/site-library/lme4’

The downloaded source packages are in
    ‘/tmp/RtmpDzIjzR/downloaded_packages’
✔  checking for file ‘/tmp/RtmpDzIjzR/remotes222a62bef96b/statOmics-msqrob2-a7c68aa/DESCRIPTION’ ...
─  preparing ‘msqrob2’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘msqrob2_1.3.0.tar.gz’

ERROR: dependency ‘lme4’ is not available for package ‘msqrob2’
* removing ‘/usr/local/lib/R/site-library/msqrob2’
Old packages: 'gplots'
Update all/some/none? [a/s/n]: a
trying URL 'https://cloud.r-project.org/src/contrib/gplots_3.1.3.tar.gz'
Content type 'application/x-gzip' length 520683 bytes (508 KB)
==================================================
downloaded 508 KB

* installing *source* package ‘gplots’ ...
** package ‘gplots’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gplots)

The downloaded source packages are in
    ‘/tmp/RtmpDzIjzR/downloaded_packages’
Warning messages:
1: In i.p(...) : installation of package ‘nloptr’ had non-zero exit status
2: In i.p(...) : installation of package ‘lme4’ had non-zero exit status
3: In i.p(...) :
  installation of package ‘/tmp/RtmpDzIjzR/file222a48e0b67/msqrob2_1.3.0.tar.gz’ had non-zero exit status

This is the sessionInfo

> print(Si, RNG = TRUE, locale = FALSE)
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rejection 

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

loaded via a namespace (and not attached):
 [1] processx_3.5.3      BiocManager_1.30.17 compiler_4.1.3     
 [4] R6_2.5.1            rprojroot_2.0.3     cli_3.2.0          
 [7] prettyunits_1.1.1   tools_4.1.3         withr_2.5.0        
[10] curl_4.3.2          crayon_1.5.1        remotes_2.4.2      
[13] callr_3.7.0         pkgbuild_1.3.1      ps_1.7.0     
> toLatex(Si, locale = FALSE)
\begin{itemize}\raggedright
  \item R version 4.1.3 (2022-03-10), \verb|x86_64-pc-linux-gnu|
  \item Running under: \verb|Ubuntu 18.04.6 LTS|
  \item Matrix products: default
  \item BLAS:   \verb|/usr/lib/x86_64-linux-gnu/openblas/libblas.so.3|
  \item LAPACK: \verb|/usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so|
  \item Base packages: base, datasets, graphics, grDevices, methods,
    stats, utils
  \item Loaded via a namespace (and not attached): BiocManager~1.30.17,
    callr~3.7.0, cli~3.2.0, compiler~4.1.3, crayon~1.5.1, curl~4.3.2,
    pkgbuild~1.3.1, prettyunits~1.1.1, processx~3.5.3, ps~1.7.0,
    R6~2.5.1, remotes~2.4.2, rprojroot~2.0.3, tools~4.1.3, withr~2.5.0
\end{itemize}
PB-Shinde commented 2 years ago

drkksharma@drkksharma-OptiPlex-9020:~$ R

R version 4.1.3 (2022-03-10) -- "One Push-Up" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

install.packages('nloptr') Installing package into ‘/usr/local/lib/R/site-library’ (as ‘lib’ is unspecified) trying URL 'https://cloud.r-project.org/src/contrib/nloptr_2.0.0.tar.gz' Content type 'application/x-gzip' length 2219414 bytes (2.1 MB)

downloaded 2.1 MB

ERROR: failed to lock directory ‘/usr/local/lib/R/site-library’ for modifying Try removing ‘/usr/local/lib/R/site-library/00LOCK-nloptr’

The downloaded source packages are in ‘/tmp/Rtmp4A0ilB/downloaded_packages’ Warning message: In install.packages("nloptr") : installation of package ‘nloptr’ had non-zero exit status

ococrook commented 2 years ago

You need to manually delete: '/usr/local/lib/R/site-library/00LOCK-nloptr’ and then try again

PB-Shinde commented 2 years ago

Hello, the problem i still there, can i install msqrob2 with conda?

ococrook commented 2 years ago

Does this help? https://support.bioconductor.org/p/133965/

lgatto commented 2 years ago

Let's address this one step at a time.

  1. Delete /usr/local/lib/R/site-library/00LOCK-nloptr if present
  2. Run install.packages('nloptr')
  3. If this fails, try again after running sudo apt-get install libnlopt-dev (and making sure you have deleted the LOCK file)
  4. If it still fails, share the output of nloptr.RCheck/00install.out.
PB-Shinde commented 2 years ago

Thank you! I installed the msqrob2 on new system so there is no issue anymore. I think my previous installations are creating issues.