Apt DartSDK 安装破坏了 apt-get

Apt DartSDK 安装破坏了 apt-get

我尝试在 Ubuntu 14.04 上安装 Dart SDK,但显然存在未满足的依赖关系。我无法解决这些依赖关系问题,更糟糕的是,我无法使用 安装任何其他东西apt-get。例如,当尝试安装 Chromium 时,我得到:

peter@cactus:~$ sudo apt-get install chromium-browser
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 chromium-browser-l10n : Depends: chromium-browser (< 39.0.2171.65-0ubuntu0.14.04.1.1064.1~) but 41.0.2272.76-0ubuntu0.14.04.1.1076 is to be installed
 dartsdk : Depends: dartvm (>= 0.5.0.1+r21823-3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

当我尝试时sudo apt-get -f install出现以下错误:

peter@cactus:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  dartvm
The following NEW packages will be installed:
  dartvm
0 upgraded, 1 newly installed, 0 to remove and 805 not upgraded.
2 not fully installed or removed.
Need to get 3,578 kB of archives.
After this operation, 12.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/hachre/dart/ubuntu/ trusty/main dartvm amd64 1.9.1+r44672-0~hachre~trusty [3,578 kB]
Fetched 3,578 kB in 25s (138 kB/s)                                                                                 
(Reading database ... 270532 files and directories currently installed.)
Preparing to unpack .../dartvm_1.9.1+r44672-0~hachre~trusty_amd64.deb ...
Unpacking dartvm (1.9.1+r44672-0~hachre~trusty) ...
dpkg: error processing archive /var/cache/apt/archives/dartvm_1.9.1+r44672-0~hachre~trusty_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/dart', which is also in package dart 1.9.1-1
Errors were encountered while processing:
 /var/cache/apt/archives/dartvm_1.9.1+r44672-0~hachre~trusty_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

你知道该如何解决这一困境吗?

以下是输出apt-cache policy dart dartvm

dart:
  Installed: 1.9.1-1
  Candidate: 1.9.1-1
  Version table:
 *** 1.9.1-1 0
        500 https://storage.googleapis.com/download.dartlang.org/linux/debian/ stable/main amd64 Packages
        100 /var/lib/dpkg/status
     1.8.5-1 0
        500 https://storage.googleapis.com/download.dartlang.org/linux/debian/ stable/main amd64 Packages
dartvm:
  Installed: (none)
  Candidate: 1.9.1+r44672-0~hachre~trusty
  Version table:
     1.9.1+r44672-0~hachre~trusty 0
        500 http://ppa.launchpad.net/hachre/dart/ubuntu/ trusty/main amd64 Packages

答案1

您尝试过这个建议吗?

尝试 '

apt-get -f install

' 没有包(或指定解决方案)

如果这不起作用,请尝试以下操作

sudo apt-get autoclean && apt-get clean
sudo aptitude update && sudo aptitude -y upgrade
sudo aptitude install <package>

并且请告知它是否来自 ppa,也许此链接可以为您提供解决方案。

添加 PPA 后如何解决未满足的依赖关系?

答案2

最终对我有用的是sudo apt-get autoremove darteditor dartsdk。显然,apt-get在满足所有软件包依赖关系之前,它不会再关注这个问题。在这种情况下,两个 dart 软件包都有未满足的依赖关系。

相关内容