skip to Main Content

I run at first:

install.packages(“tidyverse”)

After it is done running, in the end, it says:

Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
    ‘/tmp/RtmpWG5QjC/downloaded_packages’

But when I try to run:

library(tidyverse)

I get this reply:

Error in library(tidyverse) : there is no package called ‘tidyverse’

I then do this process on the ubuntu console in R but I again get the same result

The whole output while downloading:

Installing package into ‘/home/anastasis/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘httr’, ‘rvest’, ‘xml2’

trying URL 'https://cloud.r-project.org/src/contrib/curl_4.0.tar.gz'
Content type 'application/x-gzip' length 379180 bytes (370 KB)
==================================================
downloaded 370 KB

trying URL 'https://cloud.r- 
project.org/src/contrib/httr_1.4.1.tar.gz'
Content type 'application/x-gzip' length 158465 bytes (154 KB)
==================================================
downloaded 154 KB

trying URL 'https://cloud.r- 
project.org/src/contrib/rvest_0.3.4.tar.gz'
Content type 'application/x-gzip' length 1631028 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

trying URL 'https://cloud.r- 
project.org/src/contrib/xml2_1.2.2.tar.gz'
Content type 'application/x-gzip' length 261081 bytes (254 KB)
==================================================
downloaded 254 KB

trying URL 'https://cloud.r- 
project.org/src/contrib/tidyverse_1.2.1.tar.gz'
Content type 'application/x-gzip' length 61647 bytes (60 KB)
==================================================
downloaded 60 KB

* 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=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/anastasis/R/x86_64-pc-linux-gnu-library/3.4/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lxml2
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
 * deb: libxml2-dev (Debian, Ubuntu, etc)
 * rpm: libxml2-devel (Fedora, CentOS, RHEL)
 * csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.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=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘xml2’
* removing ‘/home/anastasis/R/x86_64-pc-linux-gnu-library/3.4/xml2’
Warning in install.packages :
  installation of package ‘xml2’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/anastasis/R/x86_64-pc-linux-gnu-library/3.4/httr’
Warning in install.packages :
  installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘xml2’, ‘httr’ are not available for package ‘rvest’
* removing ‘/home/anastasis/R/x86_64-pc-linux-gnu-library/3.4/rvest’
Warning in install.packages :
  installation of package ‘rvest’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘rvest’, ‘xml2’ are not available for 
package ‘tidyverse’
* removing ‘/home/anastasis/R/x86_64-pc-linux-gnu- 
library/3.4/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

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

I have the installed the dependency xml2 but when I redo the process with tidyverse I get the same result

2

Answers


  1. library(tidyverse) is syntax error.

    try double quotes like this

    library("tidyverse")

    Login or Signup to reply.
  2. It’s resolve for me (on Ubuntu 20.04):

    sudo apt-get install libgdal-dev
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search