Keep getting this error "Warning: unable to access index for repository"?
2
2
Entering edit mode
Hyoann ▴ 20
@657740f7
Last seen 11 months ago
United States

Hello! I am trying to install some packages as below:

BiocManager::install(c('CATALYST'))

but I keep encountering the errors below ("Use secure download method for HTTP" is unchecked and see Renvrion file in etc folder, but not Rprofile, Renviron.site, and Rprofile.site files - found Rprofile file in another folder, but moving it to the etc folder did not work and could not find Renviron.site and Rprofile.site files anywhere):

> BiocManager::install(c('CATALYST'))
'getOption("repos")' replaces Bioconductor standard repositories, see
'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: http://cran.rstudio.com/
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing package(s) 'CATALYST'
also installing the dependencies 'densvis', 'scater'

Warning: unable to access index for repository https://bioconductor.org/packages/3.17/data/experiment/bin/macosx/big-sur-x86_64/contrib/4.3:
  cannot open URL 'https://bioconductor.org/packages/3.17/data/experiment/bin/macosx/big-sur-x86_64/contrib/4.3/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.17/workflows/bin/macosx/big-sur-x86_64/contrib/4.3:
  cannot open URL 'https://bioconductor.org/packages/3.17/workflows/bin/macosx/big-sur-x86_64/contrib/4.3/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.17/books/bin/macosx/big-sur-x86_64/contrib/4.3:
  cannot open URL 'https://bioconductor.org/packages/3.17/books/bin/macosx/big-sur-x86_64/contrib/4.3/PACKAGES'
Package which is only available in source form, and may need
  compilation of C/C++/Fortran: 'densvis'
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source packages 'densvis', 'scater', 'CATALYST'

trying URL 'https://bioconductor.org/packages/3.17/bioc/src/contrib/densvis_1.10.1.tar.gz'
Content type 'application/x-gzip' length 1720069 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

trying URL 'https://bioconductor.org/packages/3.17/bioc/src/contrib/scater_1.28.0.tar.gz'
Content type 'application/x-gzip' length 4089325 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

trying URL 'https://bioconductor.org/packages/3.17/bioc/src/contrib/CATALYST_1.24.0.tar.gz'
Content type 'application/x-gzip' length 10825510 bytes (10.3 MB)
==================================================
downloaded 10.3 MB

* installing *source* package 'densvis' ...
** using non-staged installation via StagedInstall field
** libs
using C++ compiler: 'Apple clang version 12.0.5 (clang-1205.0.22.9)'
using C++14
using SDK: 'MacOSX11.3.sdk'
clang++ -arch x86_64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -arch x86_64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c densne.cpp -o densne.o
densne.cpp:181:24: warning: variable 'row_P' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:201:33: note: uninitialized use occurs here
    computeExpectedLogDist(&ro, row_P, col_P, val_P, val_D, N, logdist_shift);
                                ^~~~~
densne.cpp:181:24: note: remove the condition if it is always true
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:154:35: note: initialize the variable 'row_P' to silence this warning
    double* P; unsigned int* row_P; unsigned int* col_P; double* val_P; double* val_D;
                                  ^
                                   = nullptr
densne.cpp:181:24: warning: variable 'col_P' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:201:40: note: uninitialized use occurs here
    computeExpectedLogDist(&ro, row_P, col_P, val_P, val_D, N, logdist_shift);
                                       ^~~~~
densne.cpp:181:24: note: remove the condition if it is always true
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:154:56: note: initialize the variable 'col_P' to silence this warning
    double* P; unsigned int* row_P; unsigned int* col_P; double* val_P; double* val_D;
                                                       ^
                                                        = nullptr
densne.cpp:181:24: warning: variable 'val_P' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:201:47: note: uninitialized use occurs here
    computeExpectedLogDist(&ro, row_P, col_P, val_P, val_D, N, logdist_shift);
                                              ^~~~~
densne.cpp:181:24: note: remove the condition if it is always true
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:154:71: note: initialize the variable 'val_P' to silence this warning
    double* P; unsigned int* row_P; unsigned int* col_P; double* val_P; double* val_D;
                                                                      ^
                                                                       = nullptr
densne.cpp:181:24: warning: variable 'val_D' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:201:54: note: uninitialized use occurs here
    computeExpectedLogDist(&ro, row_P, col_P, val_P, val_D, N, logdist_shift);
                                                     ^~~~~
densne.cpp:181:24: note: remove the condition if it is always true
        for(int i = 0; i < N * N; i++) P[i] /= sum_P;
                       ^~~~~~~~~
densne.cpp:154:86: note: initialize the variable 'val_D' to silence this warning
    double* P; unsigned int* row_P; unsigned int* col_P; double* val_P; double* val_D;
                                                                                     ^
                                                                                      = nullptr

4 warnings generated.
clang++ -arch x86_64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c densvis.cpp -o densvis.o
clang++ -arch x86_64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c sptree.cpp -o sptree.o
clang++ -arch x86_64 -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o densvis.so RcppExports.o densne.o densvis.o sptree.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

ld: warning: directory not found for option '-L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0'
ld: warning: directory not found for option '-L/opt/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [densvis.so] Error 1

ERROR: compilation failed for package 'densvis'
* removing '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/densvis'
ERROR: dependency 'densvis' is not available for package 'scater'
* removing '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/scater'
ERROR: dependency 'scater' is not available for package 'CATALYST'
* removing '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/CATALYST'

The downloaded source packages are in
    'private/var/folders/75/1q40jjvs3pjd22q4630w41dwwm6wh2/T/RtmpmYxF0i/downloaded_packages'
Old packages: 'Matrix'
Update all/some/none? [a/s/n]: a

Warning: unable to access index for repository https://bioconductor.org/packages/3.17/data/experiment/bin/macosx/big-sur-x86_64/contrib/4.3:
  cannot open URL 'https://bioconductor.org/packages/3.17/data/experiment/bin/macosx/big-sur-x86_64/contrib/4.3/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.17/workflows/bin/macosx/big-sur-x86_64/contrib/4.3:
  cannot open URL 'https://bioconductor.org/packages/3.17/workflows/bin/macosx/big-sur-x86_64/contrib/4.3/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.17/books/bin/macosx/big-sur-x86_64/contrib/4.3:
  cannot open URL 'https://bioconductor.org/packages/3.17/books/bin/macosx/big-sur-x86_64/contrib/4.3/PACKAGES'
trying URL 'http://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/Matrix_1.5-4.tgz'
Content type 'application/x-gzip' length 5886784 bytes (5.6 MB)
==================================================
downloaded 5.6 MB


The downloaded binary packages are in
    /var/folders/75/1q40jjvs3pjd22q4630w41dwwm6wh2/T//RtmpmYxF0i/downloaded_packages
Warning messages:
1: In install.packages(...) :
  installation of package 'densvis' had non-zero exit status
2: In install.packages(...) :
  installation of package 'scater' had non-zero exit status
3: In install.packages(...) :
  installation of package 'CATALYST' had non-zero exit status

> sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.3.1

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.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

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

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] BiocManager_1.30.20

loaded via a namespace (and not attached):
[1] compiler_4.3.0 tools_4.3.0
CATALYST • 2.1k views
ADD COMMENT
0
Entering edit mode

I also had issues for installing "densvis" while trying to install other packages. Have you solved this issue?

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

The error isn't finding the repo but finding your fortran headers. I don't use MacOS, so cannot say for sure, but this appears to be something you could try.

I found that using Google, BTW, which is a good skill to cultivate.

ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 13 hours ago
Seattle, WA, United States

Should be fixed now. Can you try again?

Note that these warnings are benign and did not affect BiocManager::install()'s ability to find packages.

Best,

H.

ADD COMMENT

Login before adding your answer.

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