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