R

How to fix RcppGSL installation error gsl-config: Command not found

Problem:

While trying to install RcppGSL using

BiocManager::install("RcppGSL")

you see the following error message:

checking for gcc option to accept ISO C89... none needed
checking for gsl-config... no
configure: error: gsl-config not found, is GSL installed?
ERROR: configuration failed for package ‘RcppGSL’
* removing ‘/usr/local/lib/R/site-library/RcppGSL’

The downloaded source packages are in
        ‘/tmp/RtmpqSzFab/downloaded_packages’
Warning message:
In .inet_warning(msg) :
  installation of package ‘RcppGSL’ had non-zero exit status

Solution:

You need to install the libgsl2 development headers which include the gsl-config executable.

On Ubuntu, you can install it using

sudo apt -y install libgsl2-dev

 

Posted by Uli Köhler in R

How to fix R package installation fatal error: lzma.h: No such file or directory

Problem:

While installing some R package, you see an error message like

cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
   61 | #include 
      |          ^~~~~~~~
compilation terminated.

Solution:

You need to install the liblzma development headers. On Ubuntu, you can do that using

sudo apt -y install liblzma-dev

 

Posted by Uli Köhler in R

How to fix R package installation fatal error: bzlib.h: No such file or directory

Problem:

While installing some R package, you see an error message like

cram/cram_io.c:57:10: fatal error: bzlib.h: No such file or directory
   57 | #include 
      |          ^~~~~~~~~
compilation terminated.

Solution:

You need to install the libbz2 development headers. On Ubuntu, you can do that using

sudo apt -y install libbz2-dev

 

Posted by Uli Köhler in R

How to fix R package installation /usr/bin/ld: cannot find -lblas

Problem:

While installing some R package, you see an error message like

/usr/bin/ld: cannot find -lblas

Solution:

You need to install the libblas development headers. On Ubuntu, you can do that using

sudo apt -y install libblas-dev

 

Posted by Uli Köhler in R

How to fix R package installation /usr/bin/ld: cannot find -llapack

Problem:

While installing some R package, you see an error message like

/usr/bin/ld: cannot find -llapack

Solution:

You need to install the liblapack development headers. On Ubuntu, you can do that using

sudo apt -y install liblapack-dev

 

Posted by Uli Köhler in R

How to fix R package installation fatal error: png.h: No such file or directory

Problem:

While installing some R package, you see an error message like

/bin/bash: libpng-config: command not found
read.c:3:10: fatal error: png.h: No such file or directory
    3 | #include 
      |          ^~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: read.o] Error 1

Solution:

You need to install the libpng development headers. On Ubuntu, you can do that using

sudo apt -y install libpng-dev

 

Posted by Uli Köhler in R

How to fix R package installation fatal error: zlib.h: No such file or directory

Problem:

While installing some R package, you see an error message like

io_utils.c:16:10: fatal error: zlib.h: No such file or directory
   16 | #include <zlib.h>
      |          ^~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: io_utils.o] Error 1

Solution:

You need to install the zlib development headers. On Ubuntu, you can do that using

sudo apt -y install zlib1g-dev

 

Posted by Uli Köhler in R

How to fix R openssl error fatal error: openssl/opensslv.h: File or directory not found

Problem:

When installing the R openssl package using

BiocManager::install("openssl")

or any package depending on the openssl package, you see an error message like

-------------------------- [ERROR MESSAGE] ---------------------------
tools/version.c:1:10: fatal error: openssl/opensslv.h: File or directory not found
    1 | #include <openssl/opensslv.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘openssl’
* removing ‘/home/uli/R/x86_64-pc-linux-gnu-library/4.0/openssl’

Solution:

You need to install OpenSSL. On Ubuntu, install it using

sudo apt -y install libssl-dev

For other systems, see the description just above the error message by the authors of the package:

--------------------------- [ANTICONF] --------------------------------
Configuration failed because openssl was not found. Try installing:
 * deb: libssl-dev (Debian, Ubuntu, etc)
 * rpm: openssl-devel (Fedora, CentOS, RHEL)
 * csw: libssl_dev (Solaris)
 * brew: [email protected] (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
Posted by Uli Köhler in R

How to fix RCurl installation error xml2-config: Command not found

Problem:

While trying to install RCurl using

BiocManager::install("RCurl")

you see the following error message:

> BiocManager::install("RCurl")
/bin/bash: Zeile 1: xml2-config: Befehl nicht gefunden
/bin/bash: Zeile 1: xml2-config: Befehl nicht gefunden

Solution:

You need to install the libxml2 development headers which include the xml2-config executable.

On Ubuntu, you can install it using

sudo apt -y install libxml2-dev

 

Posted by Uli Köhler in R

How to fix RCurl installation error Cannot find curl-config

Problem:

While trying to install RCurl using

BiocManager::install("RCurl")

you see the following error message:

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

replacement repositories:
    CRAN: https://cloud.r-project.org

Bioconductor version 3.12 (BiocManager 1.30.16), R 4.0.4 (2021-02-15)
Installing package(s) 'RCurl'
versuche URL 'https://cloud.r-project.org/src/contrib/RCurl_1.98-1.6.tar.gz'
Content type 'application/x-gzip' length 731035 bytes (713 KB)
==================================================
downloaded 713 KB

* installing *source* package ‘RCurl’ ...
** Paket ‘RCurl’ erfolgreich entpackt und MD5 Summen überprüft
** using staged installation
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/usr/local/lib/R/site-library/RCurl’

The downloaded source packages are in
        ‘/tmp/RtmpVRZFXa/downloaded_packages’
Warnmeldung:
In .inet_warning(msg) :
  installation of package ‘RCurl’ had non-zero exit status

Solution:

You need to install the libcurl development headers which include the curl-config executable.

On Ubuntu, you can install it using

sudo apt -y install libcurl4-openssl-dev

 

Posted by Uli Köhler in R

How to fix RCurl ‘Cannot find curl-config’ or ‘checking for curl-config… no’

Problem:

You want to install RCurl using

Rscript -e "install.packages('RCurl')"

but you see an error message like

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/RCurl_1.98-1.2.tar.gz'
Content type 'application/x-gzip' length 699583 bytes (683 KB)
==================================================
downloaded 683 KB

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/usr/local/lib/R/site-library/RCurl’

The downloaded source packages are in
 ‘/tmp/RtmpSVQKd1/downloaded_packages’
Warning message:
In install.packages("RCurl") :
  installation of package ‘RCurl’ had non-zero exit status

Solution:

You need to install the curl development headers on your machine. RCurl complains that it can’t find those development headers.

On Ubuntu/debian, use

sudo apt -y install libcurl4-openssl-dev

 

Posted by Uli Köhler in R