Ubuntu 14.04中的Linux 3.0 – 在R 3.0.2上的install.packages(“devtools”)失败

我试图在Ubuntu 14.04上安装R 3.0.2 devtools软件包,如下所示:
install.packages("devtools")

我得到以下结果:

Installing package into ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: dependency ‘xml2’ is not available
also installing the dependency ‘rversions’

trying URL 'http://cran.rstudio.com/src/contrib/rversions_1.0.1.tar.gz'
Content type 'application/x-gzip' length 4624 bytes
opened URL
==================================================
downloaded 4624 bytes

trying URL 'http://cran.rstudio.com/src/contrib/devtools_1.8.0.tar.gz'
Content type 'application/x-gzip' length 141487 bytes (138 Kb)
opened URL
==================================================
downloaded 138 Kb

ERROR: dependency ‘xml2’ is not available for package ‘rversions’
* removing ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0/rversions’
ERROR: dependency ‘rversions’ is not available for package ‘devtools’
* removing ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0/devtools’

The downloaded source packages are in
    ‘/tmp/RtmpmDzsRJ/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
  installation of package ‘rversions’ had non-zero exit status
2: In install.packages("devtools") :
  installation of package ‘devtools’ had non-zero exit status

似乎有一个名为xml2的包的依赖。有人知道我在哪里可以找到这个包,我可以如何安装它。

我已经安装了以下内容

sudo apt-get install libxml2-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install curl
如果使用软件中心在Ubuntu中安装了R,则构建Ubuntu构建时的稳定版本。因此安装了R 3.0.2。

将以下内容添加到/etc/apt/sources.list中:

deb http://cran.rstudio.com/bin/linux/ubuntu trusty/

导致当前版本(R 3.2.0)被加载。

我不得不安装以下OpenSSL库

sudo apt-get install libssl-dev

然后我能够启动R并成功安装’devtools’

非常感谢Dirk和Pascal的意见。

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...