Macbook M1 install genefilter failed
1
0
Entering edit mode
soda ▴ 60
@5b9023e7
Last seen 9 days ago
China

macbook m1 R studio install deseq2 dependent package genefilter failed

r studio

BiocManager::install('genefilter')

#result show
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://mirrors.tuna.tsinghua.edu.cn/CRAN/

Bioconductor version 3.13 (BiocManager 1.30.16), R 4.1.0 (2021-05-18)
Installing package(s) 'genefilter'
Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘genefilter’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package ‘genefilter’

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/genefilter_1.74.0.tar.gz'
Content type 'application/x-gzip' length 805682 bytes (786 KB)
==================================================
downloaded 786 KB

* installing *source* package ‘genefilter’ ...
** using staged installation
** libs
clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c half_range_mode.cpp -o half_range_mode.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c init.c -o init.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c nd.c -o nd.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c pAUC.c -o pAUC.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c rowPAUCs.c -o rowPAUCs.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c rowttests.c -o rowttests.o
/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c ttest.f -o ttest.o
make: /opt/R/arm64/bin/gfortran: No such file or directory
make: *** [ttest.o] Error 1
ERROR: compilation failed for package ‘genefilter’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/genefilter’

The downloaded source packages are in
 ‘/private/var/folders/bt/t904ydv902d4lqg2_jxf_n600000gn/T/Rtmpz5VVBy/downloaded_packages’
Warning messages:
1: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
2: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
3: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
4: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
5: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
6: In .inet_warning(msg) :
  installation of package ‘genefilter’ had non-zero exit status

the error showed: make: /opt/R/arm64/bin/gfortran: No such file or directory. so I downloaded gfortran in terminal

macbook terminal

neurox@NeuroX ~ % cat ./.bash_profile 
export gfortran=/usr/local/gfortran/bin
export PATH=$PATH:$gfortran
neurox@NeuroX ~ % source ./.bash_profile 
neurox@NeuroX ~ % gfortran -v
使用内建 specs。
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin15/6.1.0/lto-wrapper
目标:x86_64-apple-darwin15
配置为:../gcc-6.1.0/configure --prefix=/usr/local/gfortran --with-gmp=/Users/fx/devel/gcc/deps-static/x86_64 --enable-languages=c,c++,fortran,objc,obj-c++ --build=x86_64-apple-darwin15
线程模型:posix
gcc 版本 6.1.0 (GCC)

Also, I add it to the r studio path

Sys.setenv(gfortran="/usr/local/gfortran/bin") then still failed

still get

make: /opt/R/arm64/bin/gfortran: No such file or directory

so i do this

# make link to /opt/R/arm64/bin
sudo ln -s /usr/local//gfortran/bin/gfortran /opt/R/arm64/bin

finally

BiocManager::install('genefilter')
make: /opt/R/arm64/bin/gfortran: Permission denied

upset!!! i need help thanks!

DESeq2 m1 macbook genefilter • 1.3k views
ADD COMMENT
6
Entering edit mode
soda ▴ 60
@5b9023e7
Last seen 9 days ago
China

i have solved this problem by myself. share with you. you need to download gfortran in path /opt/R/arm64/bin this website helped me: https://mac.r-project.org/libs-arm64/ ''' curl -O http://mac.R-project.org/libs-arm64/https://mac.r-project.org/libs-arm64/gfortran-f51f1da0-darwin20.0-arm64.tar.gz sudo tar fvxz https://mac.r-project.org/libs-arm64/gfortran-f51f1da0-darwin20.0-arm64.tar.gz -C / '''

ok

i succeed

ADD COMMENT
0
Entering edit mode

Thanks for sharing! I also have Apple M1 Chip. This solved my problem.

ADD REPLY
0
Entering edit mode

Hi,

Did you manage to get rid of the warning:

1: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'

I'm on a M1 chip like you and my guess is that bioconductor does not support R M1 installations yet.

ADD REPLY
0
Entering edit mode

I've got R/Bioconductor working on M1.

I'm not sure how you arrived at that error, perhaps consider supplying your code?

ADD REPLY
0
Entering edit mode

Hi Michael,

Sure

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

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

Bioconductor version 3.13 (BiocManager 1.30.16), R 4.1.1
  (2021-08-10)
Old packages: 'rmarkdown', 'xfun'
Update all/some/none? [a/s/n]: 
a
also installing the dependency ‘jquerylib’

Warning: unable to access index for repository https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'

  There are binary versions available but the source
  versions are later:
          binary source needs_compilation
rmarkdown   2.10   2.11             FALSE
xfun        0.25   0.26              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) 
ADD REPLY
0
Entering edit mode

Try [n] to updating packages, and "no" to install from source.

ADD REPLY
0
Entering edit mode

[n] stops the installation. I've tried to force since it is installed already and then I tried none as you said.

> BiocManager::install("DESeq2",force = T)
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

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

Bioconductor version 3.13 (BiocManager 1.30.16), R 4.1.1 (2021-08-10)
Installing package(s) 'DESeq2'
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘DESeq2’
Do you want to attempt to install these from sources? (Yes/no/cancel) no
Old packages: 'RCurl', 'rmarkdown', 'xfun', 'XML'
Update all/some/none? [a/s/n]: 
n
Warning messages:
1: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
2: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
3: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
4: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
5: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
ADD REPLY
0
Entering edit mode

Michael,

Do you have perhaps R binary installed for Intel chips ? Mine is arm64.pkg. I read somehwhere the binary for Intel chips works fine and it is emulated by Rosetta. I believe it's just not as fast as the binary which is dedicated for ARM chips. enter image description here

ADD REPLY
0
Entering edit mode

What happens when you do

library(DESeq2)

If it says something about genefilter, then just try to install genefilter, not DESeq2 again, and report the first error.

ADD REPLY
0
Entering edit mode

Hi Michael,

It does not complain about genefilter. I can install Deseq2 just fine from source, the only issue is that I cannot really get rid of the warning message.

Warning messages:
1: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1:
  cannot open URL 'https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'

I raised a question if Bioconductor supports M1 binaries in general and it seems like it does not, at this link :

Warning messages on Apple M1 BigSur

ADD REPLY
1
Entering edit mode

I see, yes I'm not aware of how to get rid of that warning, although I don't see it on my M1 laptop using Bioconductor packages.

ADD REPLY

Login before adding your answer.

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