2

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

  • 3
    See if [this](https://stackoverflow.com/questions/45719942/how-to-install-tidyverse-on-ubuntu-16-04-and-17-04) helps. – deepseefan Aug 21 '19 at 15:12
  • 2
    The initial message tells you that you did *not* successfully install tidyverse. The reason for this can be found in another message further up in the installation output, usually starting with “Error: …”. In your case, the “curl” package failed to install: “ERROR: configuration failed for package ‘curl’”. You first need to install libcurl (`sudo apt install libcurl-openssl-dev`). – Konrad Rudolph Aug 21 '19 at 15:12
  • Neither worked, for the first comment it doesn't really work but it says that 'dplyr.so' is not found, for @KonradRudolph comment it says: Unable to locate package libcurl-openssl-dev –  Aug 21 '19 at 15:52
  • 1
    @AnastasisPap. Ooops, spelling error, it should be `libcurl4-openssl-dev`. — Read the error message you posted carefully, the instructions are actually all in there. – Konrad Rudolph Aug 21 '19 at 16:11
  • Yeah, it actually says it but turns out I had it was already installed. Now the only errors are: lazy loading failed for package 'tidyverse' and the message: Error in library.dynam(lib, package, package.lib): shared object 'dplyr.so' not found –  Aug 21 '19 at 16:17

2 Answers2

0

It's resolve for me (on Ubuntu 20.04):

sudo apt-get install libgdal-dev
natielle
  • 380
  • 3
  • 14
-1

library(tidyverse) is syntax error.

try double quotes like this

library("tidyverse")