[英]unable to install rvest package
I need to install rvest package for R version 3.1.2 (2014-10-31)我需要为 R 版本 3.1.2 (2014-10-31) 安装 rvest 包
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?关于如何安装 R 包 rvest 的任何想法?
My system is Ubuntu 14.04 with R:3.2.3, and I had the same problem.我的系统是带有 R:3.2.3 的 Ubuntu 14.04,我遇到了同样的问题。
Then I checked err meg and tried to install library of libcurl4-openssl-dev and libxml2-dev:然后我检查了 err meg 并尝试安装 libcurl4-openssl-dev 和 libxml2-dev 库:
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libxml2-dev
After installed, install.packages("rvest")
was successful.安装后, install.packages("rvest")
成功。
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 .当我尝试在全新安装的 Ubuntu 18.04 上安装 Rstudio 版本 1.1.456 中的tidyverse, DESeq2, RUVSeq
时Rcurl, XML, rvest, xml2
我需要依赖项,例如Rcurl, XML, rvest, xml2
。 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.这个答案可能更适合作为 Ubuntu 18.04 的评论,但我没有那么多声誉。 So just trying to make a summary of solutions works for Ubuntu 18.04 here.所以只是想在这里总结一下适用于 Ubuntu 18.04 的解决方案。
In the terminal, run:在终端中,运行:
sudo apt-get install libcurl4-openssl-dev libssl-dev
sudo apt-get install libxml2-dev
Then within Rstudio,然后在 Rstudio 中,
install.packages("xml2")
install.packages("rvest")
install.packages("tidyverse") # might need other dependencies installed in Rstudio
Got tidyverse
!有tidyverse
!
In the terminal:在终端:
sudo apt-get install libmysqlclient-dev ## for RMySQL
Then within the Rstudio然后在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 .希望这个有很好的泛化性。
我能够像这样构建 stringi 包:
install.packages('stringi', configure.args='--disable-cxx11')
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:我遇到了同样的问题,所以我在 shell 上运行这个命令:
sudo apt-get upgrade pkg-config
It worked for me.它对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.