关闭

ubuntu Rstudio-server安装devtools失败

标签: r语言解决问题ubuntu
1194人阅读 评论(0) 收藏 举报
分类:

R语言安装devtools失败

1.问题提示
------------------------- 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: dependencies ‘httr’, ‘curl’, ‘rversions’ are not available for package ‘devtools’
* removing ‘/usr/local/lib/R/site-library/devtools’
##解决
sudo apt-get install libcurl4-openssl-dev

2.问题提示
ERROR: dependency ‘xml2’ is not available for package ‘rversions’
ERROR: dependency ‘rversions’ is not available for package ‘devtools’
* removing ‘/usr/local/lib/R/site-library/devtools’
##解决
install.packages("xmls2")

3.错误提示
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=...'
##解决
sudo apt-get install libxml2-dev
install.packages("xmls2")
install.packages("rversions")
install.packages("devtools")
##成功
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:89466次
    • 积分:1084
    • 等级:
    • 排名:千里之外
    • 原创:27篇
    • 转载:0篇
    • 译文:0篇
    • 评论:9条
    最新评论