1

I tried to install the Dart SDK on Ubuntu 14.04,but this apparently had unmet dependencies. I have not been able to resolve these dependency issues, and worse, I cannot install anything else using apt-get. For example when trying to install Chromium, I get:

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).

When I try sudo apt-get -f install I get the following error:

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)

Any idea how I can fix this mess?

Here is the output of 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

2 Answers2

1

Did you try the suggestion?

Try '

apt-get -f install

' with no packages (or specify a solution)

If this doesn't work try the following

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

And please tell if its from a ppa maybe this link could be a solution for you.

How do I resolve unmet dependencies after adding a PPA?

s1mmel
  • 2,024
0

What finally worked for me was sudo apt-get autoremove darteditor dartsdk. Apparently apt-get won't turn the other eye until all package dependencies are met. In this case both dart packages had unmet dependencies.