【发布时间】:2016-11-07 11:44:12
【问题描述】:
我是 stackoverflow、R 和 Ubuntu 的新手……来吧。我有一台运行带有 Oracle VM Virtual box 的虚拟 Ubuntu 机器的 Windows 机器。我的 Ubuntu 是 32 位的,是作为 Coursera 数据挖掘课程的一部分安装的。
我正在尝试使用系统命令让 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 包时,它工作正常,但是当我尝试使用 sudo apt-get install r-base-dev 安装 r-base-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:
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.
我尝试安装 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:
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.
我尝试安装 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:
dpkg-dev : Depends: libdpkg-perl (= 1.17.5ubuntu5) but 1.17.5ubuntu5.3 is to be installed
Recommends: build-essential but it is not going to be installed
Recommends: fakeroot but it is not going to be installed
Recommends: libalgorithm-merge-perl but it is not going to be installed
这里似乎存在循环逻辑,它推荐 build-essntial,但我试图安装 libdpkg-perl,所以我可以安装 build-essential...我必须在这里遗漏一些东西请帮助!
我已经阅读了足够多的内容,知道我需要 R 开发工具包才能在 R 中使用 install.packages,所以如果我无法解决这个问题,我将无法在我的应用程序中安装或包含任何标准库R 脚本。
【问题讨论】:
-
你的系统出了问题。那不应该发生。我没有在 无数 安装中看到它。 Steven Beaupré 的建议看起来很有先见之明。请尝试,然后继续。如果仍然失败,请访问 Ubuntu/Debian 上 R 的 r-sig-debian 邮件列表。
-
这个来自 Steven Beaupre 提供的链接的答案起到了作用。谢谢你!!! “运行 sudo apt-get install libdpkg-perl=1.17.5ubuntu5 以降级 libdpkg-perl。您以某种方式安装了比存储库中的更新版本的软件包,这导致其他软件包出现问题。”史蒂文将您的评论添加为“答案”,我会竖起大拇指作为正确的回应。 :)
-
这解决了眼前的问题,但结果却出现了更多这样的问题。最后,我只是放弃并安装了一个全新/干净(非 coursera)版本的 Ubuntu 作为虚拟机,并且工作正常。