Cannot install packages: ‘Gmedian’, ‘gsl’, ‘rgdal’

Error Information:

Description of issue - I am trying to install a package called ctmm (https://github.com/ctmm-initiative/ctmm). It has a long list of dependencies, most of which I have installed without a problem. However I don't seem to be able to install the three mentioned above. I have tried both by using the CRAN ctmm package and by using the github source.

Steps taken so far - Gmedian: the installation seemed to go fine, but it went on for a very long time and eventually RStudio crashed. On checking, the package was not installed. Attempts to reinstall give the following error:

** byte-compile and prepare package for lazy loading
Warning: S3 methods ‘eigs.matrix’, ‘eigs.dgeMatrix’, ‘eigs.dgCMatrix’, ‘eigs.dgRMatrix’, ‘eigs.dsyMatrix’, ‘eigs.function’, ‘eigs_sym.matrix’, ‘eigs_sym.dgeMatrix’, ‘eigs_sym.dgCMatrix’, ‘eigs_sym.dgRMatrix’, ‘eigs_sym.function’, ‘svds.matrix’, ‘svds.dgeMatrix’, ‘svds.dgCMatrix’, ‘svds.dgRMatrix’, ‘svds.dsyMatrix’, ‘svds.function’ were declared in NAMESPACE but not found
Error in library.dynam(lib, package, package.lib) :
shared object ‘RSpectra.so’ not found
ERROR: lazy loading failed for package ‘Gmedian’

  • removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.5/Gmedian’
    Warning in install.packages :
    installation of package ‘Gmedian’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpH9bDek/downloaded_packages’

gsl: the installation issues the following error message:

  • installing source package ‘gsl’ ...
    ** package ‘gsl’ successfully unpacked and MD5 sums checked
    checking for gsl-config... no
    configure: error: gsl-config not found, is GSL installed?
    ERROR: configuration failed for package ‘gsl’
  • removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.5/gsl’
    Warning in install.packages :
    installation of package ‘gsl’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpH9bDek/downloaded_packages’

rgdal: * installing source package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: R_HOME: /usr/lib/R
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: C++11 support available
configure: rgdal: 1.3-6
checking for /usr/bin/svnversion... no
configure: svn revision: 773
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’

  • removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.5/rgdal’
    Warning in install.packages :
    installation of package ‘rgdal’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpH9bDek/downloaded_packages’

I successfully installed all the other dependencies - some before these errors and some after. So I suspect that I'm missing some other dependencies somewhere, especially for Gmedian, but I don't know how to determine what they are: eigs and svds seem common themes but don't identify individual packages in the repository.

For gsl and rgdal, checking similar queries it seems as though I might be missing some libraries on my system, but I don't know how to tell which ones. Although I did try this (from another query on here):

sudo apt install libgdal1-dev libproj-dev

However this simply gave the error:

E: No se ha podido localizar el paquete libgdal1-dev

(The package libgdal1-dev cannot be found)

System Information:

  • RStudio Edition: (Desktop or Server) Desktop
  • RStudio Version: 1.1.463
  • OS Version: Unbuntu 18.04
  • R Version: 3.5.1

Also:

  • RStudio diagnostics report:
  • Your sessionInfo():
  • RStudio crash report:
  • RStudio application log files:

From Troubleshooting Guide: Using RStudio

Managed to install rgdal after installing the correct libraries on my system:

sudo apt install libgdal-dev libproj-dev

(i.e. not libgdal1)

That leaves gsl and Gmedian still to be resolved - although installing ctmm from CRAN only reports that absence of Gmedian:

install.packages("ctmm")
Installing package into ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘Gmedian’, ‘rgdal’

Try installing RSpectra

install.packages("RSpectra")

Also, install gsl in your system

sudo apt install libgsl-dev
1 Like

Yes! Brilliant, thank you.

To install gsl on my system (Ubuntu 18.04 LTS) it needed:

sudo apt install libgsl-dev

But all installed and working. Thank you again.

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.