Can't install packages on R or via Bioconductor
0
0
Entering edit mode
@dakarai_esgdaille-23260
Last seen 4.6 years ago

I recently got a new lenovo ideapad laptop and I'm dual booting Windows 10 and Ubuntu 18.04. I'm still working on getting everything configured on my new machine.

So my problem is that when I use R, I am unable to install any packages without having to wait upwards of 3-4 hours. When I run

 install.packages("dplyr")

or

BiocManager::install("annotatr")

I see blocks of output like this show up.

g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/plogr/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V28x5H/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/plogr/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V28x5H/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c address.cpp -o address.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/plogr/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V28x5H/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c api.cpp -o api.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/plogr/include" -I"/home/dakarai19/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V28x5H/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c arrange.cpp -o arrange.o

This goes on for hours and the package never installs. When I search these, I see that they are for compiling? But I never had any similar issue on my previous laptop running Windows 10 and package installations took 3 minutes at the absolute longest. Is there something I can do to fix this?

Thanks!

R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             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] BiocManager_1.30.10 compiler_3.6.3      tools_3.6.3
R installation packages annotatr biocmanager • 1.8k views
ADD COMMENT
1
Entering edit mode

Hey, what do you mean by "This goes on for hours and the package never installs." - is there an error message? It can, in some cases, take a long time for package installation when there are many dependencies and also external C libraries that have to be compiled.

ADD REPLY
1
Entering edit mode

By going on for hours I meant that I receive blocks of output code looking just like that for a long time. I've tried both Annotatr and DESeq2, left them while I went out and ran errands, and when I got home it was still running the installation. Hearing both of your answers, it seems like this isn't such a weird occurrence in the Linux distribution I'm using. I'll give it another go and see what happens.

edit: Also, there hasn't been an error message. I user interrupted the process as it reached a little over two hours once I got home from running errands.

ADD REPLY
1
Entering edit mode

For Windows, the operating system dependencies are well-defined, and CRAN and Bioconductor distribute 'binary' packages that are essentially copied from web repositories to your local computer. Your Windows installation should continue to be fast.

The code snippet you show above is for Linux. There are many distributions of Linux, and the system dependencies are in different locations. It is therefore necessary to install packages from source, and for packages with C / C++ source code this means the compilation step above.

Maybe 'going on for hours' is hyperbole? It could take a long time (10's of minutes) but not hours. You can make things faster by using options(Ncpus=8) or some number that reflects a little less than the number of cpus available on your laptop (e.g., as returned by parallel::detectCores()).

Note also that it is best practice for Bioconductor users to always use BiocManager::install(), so BiocManager::install(c("dplyr", "annotatr")).

ADD REPLY
0
Entering edit mode

I left a comment above that pretty much outlines what I meant when I said 'hours'. It really wasn't hyperbole. I'm still learning more about Ubuntu, I didn't quite understand how different things were compared to Windows. I'll give your suggestion a try and hope that helps somewhat. Thanks for the suggestions!

edit: I had a chance to give parallelization a shot. That helped a good deal. Thanks a ton!

ADD REPLY

Login before adding your answer.

Traffic: 1022 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6