无法安装rvest包

use*_*980 9 r rvest

我需要为R版本3.1.2安装rvest包(2014-10-31)

我收到这些错误:

    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’
Run Code Online (Sandbox Code Playgroud)

任何想法我怎么能安装R包rvest?

小智 25

我的系统是Ubuntu 14.04,R:3.2.3,我遇到了同样的问题.

然后我检查了err meg并尝试安装libcurl4-openssl-dev和libxml2-dev的库:

sudo apt-get install libcurl4-openssl-dev

sudo apt-get install libxml2-dev
Run Code Online (Sandbox Code Playgroud)

安装后,install.packages("rvest")成功了.


Gua*_*hen 9

我需要依赖项,例如Rcurl, XML, rvest, xml2,当我尝试tidyverse, DESeq2, RUVSeq全新安装的 Ubuntu 18.04 上安装Rstudio 版本 1.1.456 时。无论如何,有一堆缺少的依赖项。这个答案可能更适合作为 Ubuntu 18.04 的评论,但我没有那么多声誉。所以只是想在这里总结一下适用于 Ubuntu 18.04 的解决方案。
在终端中,运行:

 sudo apt-get install libcurl4-openssl-dev libssl-dev
 sudo apt-get install libxml2-dev
Run Code Online (Sandbox Code Playgroud)

然后在 Rstudio 中,

install.packages("xml2")
install.packages("rvest")
install.packages("tidyverse")  # might need other dependencies installed in Rstudio
Run Code Online (Sandbox Code Playgroud)

明白了tidyverse
在终端:

sudo apt-get install libmysqlclient-dev  ## for RMySQL
Run Code Online (Sandbox Code Playgroud)

然后在Rstudio内

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

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

在终端:

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()
Run Code Online (Sandbox Code Playgroud)

这是我自己的经历。希望这个有很好的泛化性


use*_*980 2

我能够构建 stringi 包,如下所示:

install.packages('stringi', configure.args='--disable-cxx11')
Run Code Online (Sandbox Code Playgroud)