GNU/Linux >> Linux の 問題 >  >> Ubuntu

Sudo Apt-get -f Installの実行中にエラーが発生しましたか?

パッケージを削除しようとしています:sudo apt-get remove pgbouncer しかし、次のエラーが発生しました:

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:
 linux-server : Depends: linux-image-server (= 3.2.0.44.53) but 3.2.0.45.54 is to be installed
                Depends: linux-headers-server (= 3.2.0.44.53) but 3.2.0.45.54 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get -f installを試しました しかし、私は次のようになります:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-38 linux-image-3.2.0-38-generic libpgpool0 linux-headers-3.2.0-38-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-server
The following packages will be upgraded:
  linux-server
1 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,732 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 3.2.0.44.53); however:
  Version of linux-image-server on system is 3.2.0.45.54.
 linux-server depends on linux-headers-server (= 3.2.0.44.53); however:
  Version of linux-headers-server on system is 3.2.0.45.54.
dpkg: error processing linux-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

この厄介な問題を修正するにはどうすればよいですか?

承認された回答:

http://www.iasptk.com/ubuntu-fix-broken-package-best-solution

試した後

sudo dpkg --configure -a

および

sudo apt-get install -f

パッケージが壊れているという問題はまだ存在します。解決策は、dpkgステータスファイルを手動で編集することです。

sudo gedit /var/lib/dpkg/status  

(geditの代わりにviまたはnanoを使用できます)

破損したパッケージを見つけて、そのパッケージに関する情報のブロック全体を削除し、ファイルを保存します。

これが役に立たない場合は…通過する

http://ubuntuforums.org/showthread.php?t=1642173

関連:複数のモニター構成間の単純な切り替え?

http://www.linuxquestions.org/questions/debian-26/sub-process-usr-bin-dpkg-returned-an-error-code-1-a-171107/


Ubuntu
  1. N Gnomeターミナルの代替?

  2. パッケージマネージャーを実行して12.04を更新するときのPkgproblemresolverエラー?

  3. フレッシュUbuntu12.04インストールでのPhptheadmin404エラー?

  1. 12.04でGraphviz2.29をインストールする方法は?

  2. Sudo Apt-get Installを使用しているのに、なぜソースコードがないのですか?

  3. Sudo Apt-get Install Tcl8.5-dev Tk8.5-dev?

  1. 縁石のインストール中にエラーが発生しました (0.8.5)

  2. pip経由でgnureadlineをインストールする際のエラー

  3. libc6 パッケージをインストールできません