Ubuntu安装libcairo-dev依赖错误

时间:2016-08-21 12:36:11

标签: r dependencies ubuntu-14.04 cairo apt-get

我尝试在ubuntu 14.04 64位中安装R中的gdtools,但R studio认为C

onfiguration failed because cairo was not found. Try installing:
 * deb: libcairo-dev (Debian, Ubuntu)

运行sudo apt-get install libcairo-dev后,我收到以下错误

  Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    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:
     libcairo2-dev : Depends: libcairo2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is to be installed
                     Depends: libcairo-gobject2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is to be installed
                     Depends: libfontconfig1-dev (>= 2.2.95) but it is not going to be installed
                     Depends: libfreetype6-dev (>= 2.1.10) but it is not going to be installed
                     Depends: libxrender-dev (>= 0.6) but it is not going to be installed
                     Depends: libpixman-1-dev (>= 0.22.0) but it is not going to be installed
                     Depends: libxext-dev but it is not going to be installed
                     Depends: libglib2.0-dev but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

那么我该怎么做才能解决这个问题或找出继续前进的方向? 感谢关于混合ppa的建议,但我在哪里可以找到混合PPA并删除它?

1 个答案:

答案 0 :(得分:0)

我终于解决了这个问题

首先,我清除了我的团队成员“sudo aptitude purge teamviewer:101

因为libcairo2-dev依赖于libcairo2,而我的libcairo2版本可以通过

找到

apt-cache policy libcairo2,我发现它是*** 1.1而不是*** 1,因此我将其降级为“apt-get install libcairo2=*****1”,现在它可以正常工作。

现在gdtools可以安装在R!