Error installing DEP in Rstudio on MacBook
1
0
Entering edit mode
@7f9d4e69
Last seen 3.5 years ago
Australia

Hello, I have encountered an error when installing DEP on my MacBook. I have looked through the forum and tried to re-install "bitops" but no solution. I'm not an expert user of R either. Details on the error and sessionInfo() are below. Any advice/suggestion are greatly appreciated :)

if(!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
BiocManager::install("DEP")
a
Yes

> install.packages("BiocManager")
Installing package into ‘/Users/00070611/Library/R/4.0/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/BiocManager_1.30.12.tgz'
Content type 'application/x-gzip' length 318571 bytes (311 KB)
==================================================
downloaded 311 KB


The downloaded binary packages are in
    /var/folders/hn/039m87_s3yjbqnbxbw043rhw2m0d6j/T//RtmpQpnvAS/downloaded_packages
> BiocManager::install("DEP")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.12 (BiocManager 1.30.12), R 4.0.5 (2021-03-31)
Installing package(s) 'DEP'
trying URL 'https://bioconductor.org/packages/3.12/bioc/bin/macosx/contrib/4.0/DEP_1.12.0.tgz'
Content type 'application/x-gzip' length 3114328 bytes (3.0 MB)
==================================================
downloaded 3.0 MB


The downloaded binary packages are in
    /var/folders/hn/039m87_s3yjbqnbxbw043rhw2m0d6j/T//RtmpQpnvAS/downloaded_packages
Installation paths not writeable, unable to update packages
  path: /Library/Frameworks/R.framework/Versions/4.0/Resources/library
  packages:
    cluster, mgcv
Old packages: 'bitops'
Update all/some/none? [a/s/n]: 
a

  There is a binary version available but the source version is later:
       binary source needs_compilation
bitops  1.0-6  1.0-7              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘bitops’

trying URL 'https://cran.rstudio.com/src/contrib/bitops_1.0-7.tar.gz'
Content type 'application/x-gzip' length 10809 bytes (10 KB)
==================================================
downloaded 10 KB

* installing *source* package ‘bitops’ ...
** package ‘bitops’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘bitops’
* removing ‘/Users/00070611/Library/R/4.0/library/bitops’
* restoring previous ‘/Users/00070611/Library/R/4.0/library/bitops’

The downloaded source packages are in
‘/private/var/folders/hn/039m87_s3yjbqnbxbw043rhw2m0d6j/T/RtmpQpnvAS/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘bitops’ had non-zero exit status


> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.12 compiler_4.0.5      tools_4.0.5         yaml_2.2.1
DEP • 1.6k views
ADD COMMENT
1
Entering edit mode
Basti ▴ 780
@7d45153c
Last seen 1 day ago
France

You have the error : "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun"

It seems you may have updated your OS version and this can be solved by reinstalling the Xcode toolkit. You will have to open Terminal and run :

xcode-select --install

If it doesn't work after this you could try running this code before : xcode-select --reset

ADD COMMENT
0
Entering edit mode

@Basti, thanks for that. I installed xcode via Apple Developer, but I am now getting this error:

> BiocManager::install("DEP")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.12 (BiocManager 1.30.12), R 4.0.5 (2021-03-31)
Installing package(s) 'DEP'
trying URL 'https://bioconductor.org/packages/3.12/bioc/bin/macosx/contrib/4.0/DEP_1.12.0.tgz'
Content type 'application/x-gzip' length 3114328 bytes (3.0 MB)
==================================================
downloaded 3.0 MB


The downloaded binary packages are in
    /var/folders/hn/039m87_s3yjbqnbxbw043rhw2m0d6j/T//Rtmp3bEZzN/downloaded_packages
Installation paths not writeable, unable to update packages
  path: /Library/Frameworks/R.framework/Versions/4.0/Resources/library
  packages:
    cluster, mgcv, survival

I tried to install cluster, mgcv, survival separately, but the same error pops up:

> BiocManager::install("cluster")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.12 (BiocManager 1.30.12), R 4.0.5 (2021-03-31)
Installing package(s) 'cluster'
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/cluster_2.1.2.tgz'
Content type 'application/x-gzip' length 605101 bytes (590 KB)
==================================================
downloaded 590 KB


The downloaded binary packages are in
    /var/folders/hn/039m87_s3yjbqnbxbw043rhw2m0d6j/T//Rtmp3bEZzN/downloaded_packages
Installation paths not writeable, unable to update packages
  path: /Library/Frameworks/R.framework/Versions/4.0/Resources/library
  packages:
    cluster, mgcv, survival

Any advice? Thanks, in advance :)

ADD REPLY
0
Entering edit mode

This seems to only be a warning and not an error and thus DEP package should be installed (you can try library("DEP")) Maybe you will need to update these packages one day and so I recommend you this topic that will explain tou all the possible solutions to your problem :) : https://stackoverflow.com/questions/41839214/installation-path-not-writable-r-unable-to-update-packages

ADD REPLY

Login before adding your answer.

Traffic: 953 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