Multiple errors when installing tidyverse

Hey, I'm relatively new to R, had been working fine on my computer at work, and now had to start working from home on a new computer (Ubuntu 18.04.4 LTS). Since I just installed R in this computer I'm installing the packages I usually work with. I tried to install tidyverse and this happened:

install.packages("tidyverse")
Installing package into ‘/home/usuario/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘openssl’, ‘broom’, ‘dbplyr’, ‘httr’, ‘modelr’, ‘rvest’, ‘tidyr’, ‘xml2’

then everything downloads as expected, but I get this:

*installing source package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing libcurl.pc' to the PKG_CONFIG_PATH environment variable No package 'libcurl' found Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containing libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:

  • deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
  • rpm: libcurl-devel (Fedora, CentOS, RHEL)
  • csw: libcurl_dev (Solaris)
    If libcurl is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a libcurl.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=...'

When trying to install libcurl I get this message:

install.packages("libcurl4-openssl-dev")
Installing package into ‘/home/usuario/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘libcurl4-openssl-dev’ is not available (for R version 3.4.4)

Then I get another kind of error message (when installing tidyverse):
ERROR: dependencies ‘xml2’, ‘httr’ are not available for package ‘rvest’

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

Sorry if I'm not being clear enough. Perhaps I'm missing something that's obvious to someone else. I've read plenty of entries here showing similar errors but nothing's worked so far.

Thanks,

Lucía

Have you tried following the error message instructions? You need to install this system dependency

As I said, that is a system dependency not an R package, you have to install it from a system terminal not the R console

sudo apt install libcurl4-openssl-dev

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

Thanks for the reply.
I've tried and this is the message I get:
When trying to install libcurl I get this message:

install.packages("libcurl4-openssl-dev")
Installing package into ‘/home/usuario/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘libcurl4-openssl-dev’ is not available (for R version 3.4.4)

Thank you so much!
I was failing to recognise where the error came from. It worked. I will install the latest version.
Espero que estés bien en Arequipa, fuerza Perú!

1 Like

Also, I would recommend installing the latest R version, you are using a fairly old one, you can do it by following official instructions from CRAN
https://cran.r-project.org/bin/linux/ubuntu/

1 Like