web-dev-qa-db-ja.com

dpkgでlibc6パッケージをアンインストールする

私はubuntuサーバー12.04に「libc6_2.17-0ubuntu5.1_AMD64.deb」をインストールしました。システム上の元のlibc6は2.15です。パッケージをインストールした後、次の方法で確認します。

ldd --version

それが示している:

ldd (Ubuntu EGLIBC 2.15-0ubuntu10.5) 2.15

変わらない。次に、apt-getによってlibc6に依存するものをインストールできないことがわかりました。次のように報告されます。

The following packages have unmet dependencies:
 libc-dev-bin : Depends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is to be installed
 libc6-dev : Depends: libc6 (= 2.15-0ubuntu10.5) but 2.17-0ubuntu5.1 is to be installed
 libnih1 : PreDepends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is to be installed

だから私はdebianパッケージをアンインストールしようとします、最初に私はチェックします:

dpkg -l | grep libc6
ii  libc6            2.17-0ubuntu5.1       Embedded GNU C Library: Shared libraries
ii  libc6-dev        2.15-0ubuntu10.5      Embedded GNU C Library: Development Libraries and Header Files

次に

dpkg -r libc6

Libc6に依存する多くのパッケージを出力し、次のように教えてくれます。

dpkg: error processing libc6 (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 libc6

システムに2つのバージョンのlibc6があることを知らないようです。

使用する

dpkg --get-selections

取得:

libc6                                           deinstall
libc6-dev                                       install

どうすればいいですか?

5
jean

適性で再インストールしました。 apt-getやdpkgよりもはるかに強力で、再インストールは機能しません。

Sudo aptitude reinstall libc6

The following packages will be REINSTALLED:
  libc6 
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.15-0ubuntu10.5) but 2.17-0ubuntu5.1 is installed.
 libc-dev-bin : Depends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is installed.
 libnih1 : PreDepends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is installed.
E: I wasn't able to locate a file for the libc6 package. This might mean you need to manually fix this package.
The following actions will resolve these dependencies:

     Downgrade the following packages:                                                                     
1)     libc-bin [2.15-0ubuntu10.5 (now, precise-security, precise-updates) -> 2.15-0ubuntu10 (precise)]    
2)     libc-dev-bin [2.15-0ubuntu10.5 (now, precise-security, precise-updates) -> 2.15-0ubuntu10 (precise)]
3)     libc6 [2.17-0ubuntu5.1 (now) -> 2.15-0ubuntu10 (precise)]                                           
4)     libc6-dev [2.15-0ubuntu10.5 (now, precise-security, precise-updates) -> 2.15-0ubuntu10 (precise)]

Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
  libc-bin libc-dev-bin libc6 libc6-dev 
0 packages upgraded, 0 newly installed, 4 downgraded, 0 to remove and 0 not upgraded.
Need to get 8,852 kB of archives. After unpacking 88.1 kB will be freed.
Do you want to continue? [Y/n/?] y

Aptitudeが言うように、libc6に属するパッケージは4つありますが、debファイルでインストールするのはそのうちの1つだけです。多分それがシステムをゴミ箱に捨てる理由です

2
jean