Difficulty installing SNPRelate and qvalue

188 views
Skip to first unread message

Ella Dunn

unread,
Jul 27, 2022, 1:22:05 AM7/27/22
to dartR
Hi Everyone,

I'm in the process of installing dartR. When I try to install SNPRelate and qvalue via 
BiocManager::install(c('SNPRelate', 'qvalue'))
I have the latest version of R and R studio installed.
It asks me if I would like to update packages dismo, rdgal, terra. I respond with YES 

There are binary versions available but the source versions are later:
      binary source needs_compilation
dismo  1.3-5  1.3-8              TRUE
rgdal 1.5-30 1.5-32              TRUE
terra 1.5-21  1.6-3              TRUE


Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes

and I get the following errors: I have included all of the responses for reference.

installing the source packages ‘dismo’, ‘rgdal’, ‘terra’

trying URL 'https://cran.rstudio.com/src/contrib/dismo_1.3-8.tar.gz'
Content type 'application/x-gzip' length 1176144 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.5-32.tar.gz'
Content type 'application/x-gzip' length 4469369 bytes (4.3 MB)
==================================================
downloaded 4.3 MB

trying URL 'https://cran.rstudio.com/src/contrib/terra_1.6-3.tar.gz'
Content type 'application/x-gzip' length 686866 bytes (670 KB)
==================================================
downloaded 670 KB

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang -mmacosx-version-min=10.13
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++14
configure: CFLAGS: -Wall -g -O2
configure: CPPFLAGS: -I/usr/local/include
configure: CXXFLAGS: -Wall -g -O2
configure: LDFLAGS: -L/usr/local/lib
configure: LDFLAGS: -L/usr/local/lib
configure: CXX11 is: clang++ -mmacosx-version-min=10.13, CXX11STD is: -std=gnu++11
configure: CXX is: clang++ -mmacosx-version-min=10.13 -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-32
checking for /usr/bin/svnversion... no
configure: svn revision: 1176
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rgdal’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rgdal’
* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: clang -mmacosx-version-min=10.13
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++11
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/terra’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/terra’
* installing *source* package ‘dismo’ ...
** package ‘dismo’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c percRank.cpp -o percRank.o
clang++ -mmacosx-version-min=10.13 -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/usr/local/lib -o dismo.so RcppExports.o percRank.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-dismo/00new/dismo/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
  namespace ‘terra’ 1.5-21 is already loaded, but >= 1.5.34 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘dismo’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dismo’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dismo’

The downloaded source packages are in
    ‘/private/var/folders/w5/st18lxnj70v60c2h9gsr_8yh0000gn/T/RtmpC5Zwy5/downloaded_packages’
Warning messages:
1: package(s) not installed when version(s) same as current; use `force = TRUE` to re-install: 'SNPRelate' 'qvalue'
2: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘rgdal’ had non-zero exit status
3: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘terra’ had non-zero exit status
4: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘dismo’ had non-zero exit status


FYI, I am on a MAC
Cheers,

Ella

Jose Luis Mijangos

unread,
Jul 27, 2022, 1:53:12 AM7/27/22
to dartR
Hi Ella,

Can you try:

1. Install python using this guide: https://docs.python-guide.org/starting/install3/osx/

2. Download GDAL from https://www.kyngchaos.com/files/software/frameworks/GDAL_Complete-3.2.dmg
Then Double click and install the .dmg file as you are used to on a Mac

3. In R-studio:
> library(devtools)
> # install dismo
> install_github("rspatial/dismo")
> #install rgdal
> install.packages("rgdal", repos="https://cloud.r-project.org/")
> #install terra
> install.packages('terra', repos='https://rspatial.r-universe.dev')

Cheers,
Luis

Ella Dunn

unread,
Jul 27, 2022, 2:23:47 AM7/27/22
to dartR
Hi Luis,

Thank you! dismo and terra successfully updated, however rgdal had an error as follows,

> install.packages("rgdal", repos="https://cloud.r-project.org/")
Error in install.packages : Updating loaded packages
>

Restarting R session...

> install.packages("rgdal", repos = "https://cloud.r-project.org/")

  There is a binary version available but the source version is later:
      binary source needs_compilation
rgdal 1.5-30 1.5-32              TRUE

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

trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.5-32.tar.gz'

Content type 'application/x-gzip' length 4469369 bytes (4.3 MB)
==================================================
downloaded 4.3 MB

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang -mmacosx-version-min=10.13
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++14
configure: CFLAGS: -Wall -g -O2
configure: CPPFLAGS: -I/usr/local/include
configure: CXXFLAGS: -Wall -g -O2
configure: LDFLAGS: -L/usr/local/lib
configure: LDFLAGS: -L/usr/local/lib
configure: CXX11 is: clang++ -mmacosx-version-min=10.13, CXX11STD is: -std=gnu++11
configure: CXX is: clang++ -mmacosx-version-min=10.13 -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-32
checking for /usr/bin/svnversion... no
configure: svn revision: 1176
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rgdal’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rgdal’
Warning in install.packages :

  installation of package ‘rgdal’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/w5/st18lxnj70v60c2h9gsr_8yh0000gn/T/Rtmpr01HWo/downloaded_packages’

Any other ideas?
Thank you so much for your help and quick response.

Cheers,
Ella

Reply all
Reply to author
Forward
0 new messages