problems about installation of package ‘Rhtslib’, ‘Rsamtools’ ,‘GenomicAlignments’ , ‘ShortRead’ on macOS Big Sur using R 4.1.0
1
2
Entering edit mode
lh290 ▴ 20
@37be8c18
Last seen 9 weeks ago
China

I am trying to install Rhtslib on macOS Big Sur M1 using R 4.1.0. But I get the following error. And this problem is not unique to me, I have found there are other users with the same problems in github.



Bioconductor version 3.13 (BiocManager 1.30.15), R 4.1.0 (2021-05-18)
Installing package(s) 'dada2'
also installing the dependencies ‘Rsamtools’, ‘GenomicAlignments’, ‘Rhtslib’, ‘ShortRead’

Packages which are only available in source form, and may need compilation of
  C/C++/Fortran: ‘Rsamtools’ ‘GenomicAlignments’ ‘Rhtslib’ ‘ShortRead’ ‘dada2’
Do you want to attempt to install these from sources? (Yes/no/cancel) 
installing the source packages ‘Rsamtools’, ‘GenomicAlignments’, ‘Rhtslib’, ‘ShortRead’, ‘dada2’

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/Rsamtools_2.8.0.tar.gz'
Content type 'application/x-gzip' length 2870315 bytes (2.7 MB)
==================================================
downloaded 2.7 MB

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/GenomicAlignments_1.28.0.tar.gz'
Content type 'application/x-gzip' length 2301182 bytes (2.2 MB)
==================================================
downloaded 2.2 MB

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/Rhtslib_1.24.0.tar.gz'
Content type 'application/x-gzip' length 1471711 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/ShortRead_1.50.0.tar.gz'
Content type 'application/x-gzip' length 5184732 bytes (4.9 MB)
==================================================
downloaded 4.9 MB

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/dada2_1.20.0.tar.gz'
Content type 'application/x-gzip' length 2871808 bytes (2.7 MB)
==================================================
downloaded 2.7 MB

* installing *source* package ‘Rhtslib’ ...
** using non-staged installation via StagedInstall field
** libs
cd "htslib-1.7" && make -f "/Library/Frameworks/R.framework/Resources/etc/Makeconf" -f "Makefile.Rhtslib"
Makefile.Rhtslib:128: warning: overriding commands for target `.c.o'
/Library/Frameworks/R.framework/Resources/etc/Makeconf:168: warning: ignoring old commands for target `.c.o'
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o kfunc.o kfunc.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o knetfile.o knetfile.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o kstring.o kstring.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o bcf_sr_sort.o bcf_sr_sort.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o bgzf.o bgzf.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o errmod.o errmod.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o faidx.o faidx.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o hfile.o hfile.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.7"' > version.h
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o hts.o hts.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o hts_os.o hts_os.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o md5.o md5.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o multipart.o multipart.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o probaln.o probaln.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o realn.o realn.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o regidx.o regidx.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o sam.o sam.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o synced_bcf_reader.o synced_bcf_reader.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o vcf_sweep.o vcf_sweep.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o tbx.o tbx.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o textutils.o textutils.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o thread_pool.o thread_pool.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o vcf.o vcf.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o vcfutils.o vcfutils.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_codecs.o cram/cram_codecs.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_decode.o cram/cram_decode.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_encode.o cram/cram_encode.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_external.o cram/cram_external.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_index.o cram/cram_index.c
clang -arch arm64 -falign-functions=64 -Wall -g -O2  -fpic -I. -I/opt/R/arm64/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_io.o cram/cram_io.c
cram/cram_io.c:61:10: fatal error: 'lzma.h' file not found
#include <lzma.h>
         ^~~~~~~~
1 error generated.
make[1]: *** [cram/cram_io.o] Error 1
make: *** [htslib] Error 2
ERROR: compilation failed for package ‘Rhtslib’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rhtslib’
ERROR: dependency ‘Rhtslib’ is not available for package ‘Rsamtools’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rsamtools’
ERROR: dependency ‘Rsamtools’ is not available for package ‘GenomicAlignments’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/GenomicAlignments’
ERROR: dependencies ‘Rsamtools’, ‘GenomicAlignments’, ‘Rhtslib’ are not available for package ‘ShortRead’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ShortRead’
ERROR: dependency ‘ShortRead’ is not available for package ‘dada2’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/dada2’

The downloaded source packages are in
    ‘/private/var/folders/yn/fdgc5kpj3056n7nw_g3wsf780000gn/T/RtmpHqRdfV/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 ‘Rhtslib’ had non-zero exit status
7: In .inet_warning(msg) :
  installation of package ‘Rsamtools’ had non-zero exit status
8: In .inet_warning(msg) :
  installation of package ‘GenomicAlignments’ had non-zero exit status
9: In .inet_warning(msg) :
  installation of package ‘ShortRead’ had non-zero exit status

i would be grateful if the relevant people can pay attention to this problem and offer me some suggestion.

dada2 • 651 views
ADD COMMENT
0
Entering edit mode
ADD REPLY
4
Entering edit mode
@herve-pages-1542
Last seen 1 day ago
Seattle, WA, United States

Hi,

Note that you are using a version of R that was compiled for macOS-arm64, probably R-4.1.0-arm64.pkg from CRAN.

Please be aware that Bioconductor does not support the Apple M1 (a.k.a. arm64) architecture in native mode yet, only via Rosetta, which is the emulator built into macOS Big Sur that enables Mac M1 systems to run Intel x86_64 apps. Concretely this means that if you are on an Apple M1 system, we strongly recommend that you use the official Intel 64-bit R (x86_64 arch) from CRAN available here: https://cran.r-project.org/bin/macosx/ (choose R-4.1.0.pkg, NOT R-4.1.0-arm64.pkg). This will run on the Apple M1 platform in emulation mode.

The great benefit of doing this is that you will then be using something that we do support. In particular you'll be able to install Intel 64-bit Mac binary packages from CRAN and Bioconductor, including the Mac binary for Rhtslib which should install and work out-of-the-box without any compilation/linking/headache involved. Installing binary packages is also _much_ faster.

Best,

H.

ADD COMMENT
0
Entering edit mode

THANK YOU!!! IT WORKS

ADD REPLY

Login before adding your answer.

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