Ubuntuでapt-getを使用して満たされていない依存関係を解決する

Ubuntuでapt-getを使用して満たされていない依存関係を解決する

私は機械作業をしていますUbuntu 12.04.2 LTS (GNU/Linux 3.5.0-43-generic x86_64)。他のプロジェクトと一緒に本番環境で実行されているサーバーなので、非常に注意が必要です。

特定のプログラムのリストをインストールする必要があるため、まず一般的なプログラムを実行し、次のapt-get updateコマンドを実行し続けました。

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

これが私が得るものです:

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

「不足していない依存関係」を持つパッケージをインストールするにはどうすればよいですか?これらの依存関係をどのように満たすことができますか?-f提案されているように、このオプションを使用することはすべてを台無しにする可能性があるため恐れています。

ベストアンサー1

インストールが失敗した後、次のものを使用できます。

apt-get -f install

これにより、すべての依存関係とともに要求されたパッケージが自動的にインストールされます。

おすすめ記事