ubuntu Rstudio-server安裝devtools失敗

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")
##成功
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章