16

I need to install rvest package for R version 3.1.2 (2014-10-31)

I get these errors:

    checking whether the C++ compiler supports the long long type... no
*** stringi cannot be built. Upgrade your C++ compiler's settings
ERROR: configuration failed for package ‘stringi’
* removing ‘/usr/local/lib64/R/library/stringi’
ERROR: dependency ‘stringi’ is not available for package ‘stringr’
* removing ‘/usr/local/lib64/R/library/stringr’
ERROR: dependency ‘stringr’ is not available for package ‘httr’
* removing ‘/usr/local/lib64/R/library/httr’
ERROR: dependency ‘stringr’ is not available for package ‘selectr’
* removing ‘/usr/local/lib64/R/library/selectr’
ERROR: dependencies ‘httr’, ‘selectr’ are not available for package ‘rvest’
* removing ‘/usr/local/lib64/R/library/rvest’

Any ideas on how I could install R package rvest?

7
  • 1
    are you installing from CRAN? What was the command you used?
    – jeremycg
    Commented Jun 23, 2015 at 16:59
  • 1
    install.packages("rvest") Commented Jun 23, 2015 at 17:07
  • did you try updating whether the C++ compiler supports the long long type? Commented Jun 23, 2015 at 17:20
  • @AaronKatch, I am not sure how to do that Commented Jun 23, 2015 at 17:31
  • Since you are using an out-of-date version of R, you will need to be compiling from package versions that match the old version and you will need to be using development versions of R and supporting tools since the headers are sometimes missing in the base distributions.
    – IRTFM
    Commented Jun 23, 2015 at 17:35

4 Answers 4

34

My system is Ubuntu 14.04 with R:3.2.3, and I had the same problem.

Then I checked err meg and tried to install library of libcurl4-openssl-dev and libxml2-dev:

sudo apt-get install libcurl4-openssl-dev

sudo apt-get install libxml2-dev

After installed, install.packages("rvest") was successful.

1
  • It's rvest not vrest
    – SmallChess
    Commented Jan 4, 2018 at 8:18
11

I needed dependencies such as Rcurl, XML, rvest, xml2, when I was trying to install tidyverse, DESeq2, RUVSeq in Rstudio Version 1.1.456 on a fresh installed Ubuntu 18.04. Anyway, there were a bunch of missing dependencies. This answer might fit better as a comment for Ubuntu 18.04, but I don't have that many reputation. So just trying to make a summary of solutions works for Ubuntu 18.04 here.
In the terminal, run:

 sudo apt-get install libcurl4-openssl-dev libssl-dev
 sudo apt-get install libxml2-dev

Then within Rstudio,

install.packages("xml2")
install.packages("rvest")
install.packages("tidyverse")  # might need other dependencies installed in Rstudio

Got tidyverse!
In the terminal:

sudo apt-get install libmysqlclient-dev  ## for RMySQL

Then within the Rstudio

source("https://bioconductor.org/biocLite.R")
biocLite("DESeq2")
biocLite('RUVSeq')             ## might have messages as following

installation path not writeable, unable to update packages: cluster, foreign, MASS, Matrix, mgcv, nlme, survival

In the terminal:

sudo R                      ## give R the root permission
## in the R session within the terminal
pks <- c('cluster', 'foreign', 'MASS', 'Matrix', 'mgcv', 'nlme', 'survival')
install.packages(pks)
q()

That's my own experience. Hope this one has a good Generalizability.

1
  • Thanks, this fixed the issue I was having! Commented Jun 6, 2022 at 17:59
2

I was able to build the stringi package as this:

install.packages('stringi', configure.args='--disable-cxx11')
1
  • Good, but file a ticket with stringi as it should (ideally) do that automagically when an insufficient compiler is found. Commented Jun 23, 2015 at 18:45
0

My answer is definitely late to this question. Nevertheless, somebody may find it useful.

I run into the same problem so I run this command on the shell:

sudo apt-get upgrade pkg-config

It worked for me.

Not the answer you're looking for? Browse other questions tagged or ask your own question.