0

I'm looking for help trying to install IRanges from BiocManager on a Mac. Here's the install log with the error:

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

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

Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23)
Installing package(s) 'IRanges'
also installing the dependency ‘S4Vectors’

Warning: unable to access index for repository https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘S4Vectors’ ‘IRanges’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source packages ‘S4Vectors’, ‘IRanges’

trying URL 'https://bioconductor.org/packages/3.15/bioc/src/contrib/S4Vectors_0.34.0.tar.gz'
Content type 'application/x-gzip' length 618611 bytes (604 KB)
==================================================
downloaded 604 KB

trying URL 'https://bioconductor.org/packages/3.15/bioc/src/contrib/IRanges_2.30.1.tar.gz'
Content type 'application/x-gzip' length 456213 bytes (445 KB)
==================================================
downloaded 445 KB

* installing *source* package ‘S4Vectors’ ...
** 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 ‘S4Vectors’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/S4Vectors’
ERROR: dependency ‘S4Vectors’ is not available for package ‘IRanges’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/IRanges’

The downloaded source packages are in
    ‘/private/var/folders/y4/qnpttkr96hdcv5b8jhnjvp9w0000gn/T/Rtmp0PjDEd/downloaded_packages’
Warning messages:
1: In install.packages(...) :
  installation of package ‘S4Vectors’ had non-zero exit status
2: In install.packages(...) :
  installation of package ‘IRanges’ had non-zero exit status

I don't know what to do. It previously installed smoothly on my old Mac but it doesn't on the new one ... Any idea?

Chris Ruehlemann
  • 20,321
  • 4
  • 12
  • 34
  • It looks like the `xcrun` error message is not related to R but to `xcode`. Have you already looked at [this question](https://stackoverflow.com/questions/52522565/git-is-not-working-after-macos-update-xcrun-error-invalid-active-developer-pa)? In one line, "The problem is that Xcode Command-line Tools needs to be updated." – bretauv Oct 24 '22 at 12:40
  • 1
    [install Xcode](https://community.rstudio.com/t/xcrun-error-invalid-active-developer-path-library-developer-commandlinetools-missing-xcrun-at-library-developer-commandlinetools-usr-bin-xcrun-error-compilation-failed-for-package-rlang/27553/3), update `rlang`, the xcode part is down in the weeds... – Chris Oct 24 '22 at 12:46
  • I've installed `Xcode`and re-run `rlang`and it works! If you'd put the comment as an answer I'd be happy to accept it! – Chris Ruehlemann Oct 24 '22 at 19:55

0 Answers0