32

I tried installing beanstalkd with sudo apt-get install beanstalkd (also with -f option) and I get the following error:

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:
  beanstalkd: Depends: libevent-1.4-2 (>= 1.4.13-stable) but it is not going to be installed
  mysql-server-5.1: Depends: mysql-client-5.1 (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed
                    Depends: libmysqlclient16 (>= 5.1.21-1) but it is not going to be installed
                    Depends: mysql-server-core-5.1 (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed
                    PreDepends: mysql-common (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
loklaan
  • 800
  • 1
  • 7
  • 18
aWebDeveloper
  • 633
  • 1
  • 8
  • 14

4 Answers4

41

First download the deb package from repository

apt-get download <package_name>

Install the deb file ( it should be in current folder )

sudo dpkg -i <downloaded_package_deb_file>
ineicu
  • 421
  • 4
  • 2
  • Why was this downvoted? This has fixed my problem with installing fake-pae ( https://launchpad.net/~prof7bit/+archive/fake-pae/ ) after I had upgraded to Ubuntu 12.10. Thank you so much! – Ads20000 Oct 19 '13 at 08:23
  • thanks so much for this answer. At least by doing this I can now see the the version conflicts that are causing the new package to get ignored (libstdc++6 dep in new package is newer) – Mat Schaffer Jul 03 '15 at 03:57
  • `aptitude download ` also works – PythoNic Mar 22 '16 at 15:20
  • 4
    @Ads20000, it may have been downvoted because just `-i` won't resolve any dependency problems. However, if ineicu had shown the `--force-depends` trick, maybe the downvote would not have happened: `sudo dpkg --force-depends -i ` will install a package even if a dependency is considered missing. – Alexis Wilke May 25 '16 at 04:09
  • `apt-get download` completes but does not create any files in the current directory for me – jozxyqk Dec 08 '21 at 23:30
7

Try

sudo apt-get install -f

with no package in terminal.

If this still gives the error of the dependencies then you will have to issue

sudo apt-get remove beanstalkd

then try

sudo apt-get install mysql-server beanstalkd

That should install the mysql dependencies and beanstalk.

VooDooStevie
  • 199
  • 1
  • 4
4

try running sudo apt-get --fix-missing install

fossfreedom
  • 171,546
  • 47
  • 376
  • 404
user95688
  • 41
  • 2
1

Run

apt --fix-broken install

with no packages. And the try to install the packages again.

nipunasudha
  • 111
  • 3