1

I am working on a Ubuntu 12.04.2 LTS (GNU/Linux 3.5.0-43-generic x86_64) machine. It is a server running in production environment with other projects so I have to be quite careful.

I have to install a certain list of programs, so first I run the usual apt-get update and then I proceeded to run the following command:

apt-get install python-dev libxslt1-dev libpq-dev git python-pip nginx supervisor wget libxml2-dev mongodb build-essential libxslt1-dev libxrender1 libxext6`

This is what I get:

root@SERVERLINUX:~# apt-get install python-dev libxslt1-dev libpq-dev git python-pip nginx supervisor wget libxml2-dev mongodb build-essential libxslt1-dev libxrender1 libxext6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version.
python-pip is already the newest version.
build-essential is already the newest version.
libxext6 is already the newest version.
libxrender1 is already the newest version.
libxrender1 set to manually installed.
python-dev is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libpq-dev : Depends: libpq5 (= 9.1.14-0ubuntu0.12.04) but 9.1.9-0ubuntu12.04 is to be installed
             Depends: libkrb5-dev but it is not going to be installed
             Depends: comerr-dev but it is not going to be installed
 libxml2-dev : Depends: libxml2 (= 2.7.8.dfsg-5.1ubuntu4.9) but 2.7.8.dfsg-5.1ubuntu4.6 is to be installed
 linux-image-generic-lts-quantal : Depends: linux-image-3.5.0-44-generic but it is not going to be installed
 mongodb : Depends: mongodb-server but it is not going to be installed
           Depends: mongodb-dev but it is not going to be installed
 nginx : Depends: nginx-full but it is not going to be installed or
                  nginx-light but it is not going to be installed
 supervisor : Depends: python-medusa (>= 0.5.4) but it is not going to be installed
              Depends: python-meld3 but it is not going to be installed
              Depends: python-support (>= 0.90.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

What should I do to manage to install the packages with "unmet dependencies"? HOw can I meet those dependencies? I am afraid to use the -f option as suggested because it might just mess everything up.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
Xar
  • 353
  • 1
    Read http://unix.stackexchange.com/q/121180/4671, please, particularly my answer, and provide the information requested in your question. – Faheem Mitha Sep 06 '14 at 20:24

2 Answers2

1

After the failure to install, you can use:

apt-get -f install

This will automatically install the requested packages along with all the dependencies,

Jan
  • 7,772
  • 2
  • 35
  • 41
1

You can try to find older version of these packages and install it manually by dpkg -i packagename to decrease dependencies list and, probably, decrease potential thread to your system.

Sild
  • 325