Installing 'affy' package on MacOS M2 chip
2
0
Entering edit mode
@1225f050
Last seen 2.0 years ago
Germany

Dear conductors,

I am trying to install the "affy" package. However, it has not worked despite trying multiple ways of installing. When I enter

> if (!require("BiocManager", quietly = TRUE))
+     install.packages("BiocManager")
> 
> BiocManager::install("affy")

.. the output is ..

Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23)
Old packages: 'nlme'
Update all/some/none? [a/s/n]: 
a
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'

  There is a binary version available but the source version is later:
      binary  source needs_compilation
nlme 3.1-159 3.1-160              TRUE

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

trying URL 'http://cran.rstudio.com/src/contrib/nlme_3.1-160.tar.gz'
Content type 'application/x-gzip' length 845714 bytes (825 KB)
==================================================
downloaded 825 KB

* installing *source* package ‘nlme’ ...
** package ‘nlme’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c chol.f -o chol.o
make: /opt/R/arm64/bin/gfortran: No such file or directory
make: *** [chol.o] Error 1
ERROR: compilation failed for package ‘nlme’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/nlme’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/nlme’

The downloaded source packages are in
    ‘/private/var/folders/d5/43pf7c_937s_23qqt7xvnkd40000gp/T/RtmpDh13j4/downloaded_packages’
Warning messages:
1: package(s) not installed when version(s) same as current; use `force = TRUE` to re-install: 'affy' 
2: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘nlme’ had non-zero exit status

So there seems to be a problem with the nlme package. I uninstalled and tried re-installing 'nlme', but now it shows:

> install.packages("nlme")

  There is a binary version available but the source version is later:
      binary  source needs_compilation
nlme 3.1-159 3.1-160              TRUE

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

trying URL 'http://cran.rstudio.com/src/contrib/nlme_3.1-160.tar.gz'
Content type 'application/x-gzip' length 845714 bytes (825 KB)
==================================================
downloaded 825 KB

* installing *source* package ‘nlme’ ...
** package ‘nlme’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c chol.f -o chol.o
make: /opt/R/arm64/bin/gfortran: No such file or directory
make: *** [chol.o] Error 1
ERROR: compilation failed for package ‘nlme’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/nlme’
Warning in install.packages :
  installation of package ‘nlme’ had non-zero exit status

Can anyone help me figure out how to install the affy package? I seem to be needing 'nlme' which does not install and 'preprocessCore' which also gives an error message when I try to install it. Thanks in advance!

Best regards, Philipp

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

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

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

other attached packages:
 [1] EnhancedVolcano_1.14.0 limma_3.52.4           mclust_5.4.10          ggrepel_0.9.1          hgu133plus2.db_3.13.0 
 [6] org.Hs.eg.db_3.15.0    AnnotationDbi_1.58.0   IRanges_2.30.1         S4Vectors_0.34.0       Biobase_2.56.0        
[11] BiocGenerics_0.42.0    forcats_0.5.2          stringr_1.4.1          dplyr_1.0.10           purrr_0.3.5           
[16] readr_2.1.3            tidyr_1.2.1            tibble_3.1.8           tidyverse_1.3.2        reshape2_1.4.4        
[21] fgsea_1.22.0           cowplot_1.1.1          plotly_4.10.0          ggplot2_3.3.6          readxl_1.4.1          
[26] pheatmap_1.0.12        BiocManager_1.30.18   

loaded via a namespace (and not attached):
  [1] backports_1.4.1        fastmatch_1.1-3        plyr_1.8.7             igraph_1.3.5           lazyeval_0.2.2        
  [6] splines_4.2.1          BiocParallel_1.30.3    GenomeInfoDb_1.32.4    digest_0.6.29          yulab.utils_0.0.5     
 [11] htmltools_0.5.3        GOSemSim_2.22.0        viridis_0.6.2          GO.db_3.15.0           fansi_1.0.3           
 [16] magrittr_2.0.3         memoise_2.0.1          googlesheets4_1.0.1    tzdb_0.3.0             Biostrings_2.64.1     
 [21] graphlayouts_0.8.2     modelr_0.1.9           colorspace_2.0-3       blob_1.2.3             rvest_1.0.3           
 [26] haven_2.5.1            xfun_0.33              crayon_1.5.2           RCurl_1.98-1.9         jsonlite_1.8.2        
 [31] glue_1.6.2             polyclip_1.10-0        gtable_0.3.1           gargle_1.2.1           zlibbioc_1.42.0       
 [36] XVector_0.36.0         scales_1.2.1           DOSE_3.22.1            DBI_1.1.3              Rcpp_1.0.9            
 [41] viridisLite_0.4.1      gridGraphics_0.5-1     bit_4.0.4              htmlwidgets_1.5.4      httr_1.4.4            
 [46] RColorBrewer_1.1-3     ellipsis_0.3.2         pkgconfig_2.0.3        farver_2.1.1           dbplyr_2.2.1          
 [51] utf8_1.2.2             ggplotify_0.1.0        tidyselect_1.2.0       rlang_1.0.6            munsell_0.5.0         
 [56] cellranger_1.1.0       tools_4.2.1            cachem_1.0.6           downloader_0.4         cli_3.4.1             
 [61] generics_0.1.3         RSQLite_2.2.18         broom_1.0.1            evaluate_0.17          fastmap_1.1.0         
 [66] knitr_1.40             bit64_4.0.5            fs_1.5.2               tidygraph_1.2.2        KEGGREST_1.36.3       
 [71] ggraph_2.1.0           aplot_0.1.8            DO.db_2.9              xml2_1.3.3             compiler_4.2.1        
 [76] rstudioapi_0.14        png_0.1-7              reprex_2.0.2           tweenr_2.0.2           stringi_1.7.8         
 [81] lattice_0.20-45        Matrix_1.5-1           vctrs_0.4.2            pillar_1.8.1           lifecycle_1.0.3       
 [86] data.table_1.14.2      bitops_1.0-7           patchwork_1.1.2        qvalue_2.28.0          R6_2.5.1              
 [91] gridExtra_2.3          codetools_0.2-18       MASS_7.3-58.1          assertthat_0.2.1       withr_2.5.0           
 [96] GenomeInfoDbData_1.2.8 parallel_4.2.1         hms_1.1.2              grid_4.2.1             ggfun_0.0.7           
[101] googledrive_2.0.0      ggforce_0.4.1          lubridate_1.8.0
nlme affy preprocessCore • 2.8k views
ADD COMMENT
1
Entering edit mode

gfortran seems to not be installed, you may follow this tutorial : https://www.cynkra.com/blog/2021-03-16-gfortran-macos/

ADD REPLY
1
Entering edit mode
@c635ce62
Last seen 3 months ago
United States

I suggest trying the binaries we've started building on a Mac M1 for Bioconductor devel: https://bioconductor.org/checkResults/3.16/bioc-mac-arm64-LATEST/. We're still working out issues with the M1 builds and we have not yet to my knowledge had anyone try it on an M2, so it will be interesting to know how it works out.

ADD COMMENT
0
Entering edit mode

Thanks for your input! What do I need to do on this website? Sorry if that's a stupid question but I don't see anything to download? Could you help me?

ADD REPLY
1
Entering edit mode

To get the binaries that Jennifer is suggesting, you need to be running Bioconductor devel. We are close enough to release that it's not likely to be a problem (running devel early in the release cycle may entail using packages that are in the midst of being developed, and may have more bugs). Anyway, to use the devel packages now (meaning between the April and October releases), you simply do

library(BiocManager)
install(version = "devel")
ADD REPLY
0
Entering edit mode

Hey James, it worked! Thank you so much, I owe you one.

Have a great day!

Cheers,

Philipp

ADD REPLY
0
Entering edit mode

Glad it worked. It's also good to know that the M1 binaries seem to work with the M2 machines as well.

ADD REPLY
0
Entering edit mode

Thank you for this, you saved the day! I appreciate it.

Best,

Philipp

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 35 minutes ago
United States

There's two problems here. First you appear unable to query the Bioconductor repository, so you cannot even download the packages you are requesting. That may be a temporal issue, and you should try again. Second, you are saying 'yes' to the installation of a source package on an M2 machine. Don't do that. It took until recently for people who are in the know to compile packages on M2, so trying to do that yourself is just asking for problems.

ADD COMMENT
0
Entering edit mode

Hey, thank you for the advice! I tried again and it still gives the "unable to access index for repository (...))" error message.. Not sure what to do now. If I say "no", the installation simply stops so what am I supposed to do? Thanks again.

ADD REPLY

Login before adding your answer.

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