由于依赖性,r-base-dev不会安装

时间:2015-09-26 14:53:17

标签: linux r ubuntu

我是stackoverflow,R和Ubuntu的新手......这里有。我有一台运行带有Oracle VM虚拟盒的虚拟Ubuntu机器的Windows机器。我的Ubuntu是32位,是作为Coursera数据挖掘课程的一部分安装的。

我试图通过使用system命令将word2vec.c和word2phrase.c编译并在R中使用。我做了大量的研究,发现windows机器上不支持pthread.h,所以我想我会在Ubuntu虚拟机上安装R来解决这个问题。我按照说明在Ubuntu上安装了R:http://sites.psu.edu/theubunturblog/installing-r-in-ubuntu/当我使用sudo apt-get install r-base安装基本R包时,它工作正常,但是当我尝试使用{安装r-base-dev应用程序时{1}}我收到以下错误:

sudo apt-get install r-base-dev

我尝试过安装build-essential,但是收到类似这样的警告/错误消息:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-base-dev : Depends: build-essential but it is not going to be installed
              Depends: cdbs but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我试着安装dpkg-dev及其依赖项,直到我发现这个警告的死胡同:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

这里似乎有循环逻辑,它推荐build-essntial但是我试图安装libdpkg-perl所以我可以安装build-essential ...我必须在这里遗漏一些东西请帮忙!

我已经阅读了足够的知道我需要R开发工具包在R中使用install.packages,所以如果我无法解决这个问题,我将无法安装或包括我的R脚本中的任何标准库。

2 个答案:

答案 0 :(得分:2)

最后问题是我下载的Ubuntu映像已损坏。我重新下载了它,问题就消失了。

答案 1 :(得分:0)

以下是我昨天在新的Ubuntu 15.04(Vivid)安装上安装R的步骤:

  1. sudo sh -c' echo" deb http://cran.rstudio.com/bin/linux/ubuntu 生动 /" >> /etc/apt/sources.list'

  2. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

  3. sudo apt-get update
  4. sudo apt-get install r-base
  5. sudo apt-get install r-base-dev
  6. 您可能需要用ubuntu

    替换生动