mysql-server-5.5 apt-getが実行されるたびに満たされていない依存関係

mysql-server-5.5 apt-getが実行されるたびに満たされていない依存関係

「sudo apt-get install package-name」を実行するたびに、mysql以外に別のパッケージをインストールしようとすると、次のエラーが発生します。

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.44-0ubuntu0.12.04.1) but 5.5.46-0ubuntu0.12.04.2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

例:mysql-5.5.44をダウンロードして「cmake .」を実行してインストールしようとすると、cmakeがまだインストールされていないというメッセージが表示されます。 "sudo apt-get install cmake"を実行すると、次のエラーが発生します。

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:
 cmake : Depends: libxmlrpc-core-c3 but it is not going to be installed
         Depends: cmake-data (= 2.8.7-0ubuntu5) but it is not going to be installed
 mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.44-0ubuntu0.12.04.1) but 5.5.46-0ubuntu0.12.04.2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

修正する

このサイトで同様の質問をたくさん見つけましたが、まだ問題があります。私のソースのリスト:

# deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/main/binary-i386/

# deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ca.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ca.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ca.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise universe
deb http://ca.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ca.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://ca.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://ubunturepo.internal/orgname precise/devgroup/devel main
deb http://archive.canonical.com/ precise partner
deb-src http://archive.canonical.com/ precise partner

出力の実行: apt-cache ポリシー cmake libxmlrpc-core-c3 cmake-data mysql-server-5.5 mysql-server-core-5.5

cmake:
  Installed: (none)
  Candidate: 2.8.7-0ubuntu5
  Version table:
     2.8.7-0ubuntu5 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     2.8.7-0ubuntu4 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libxmlrpc-core-c3:
  Installed: (none)
  Candidate: 1.16.33-3.1ubuntu5.1
  Version table:
     1.16.33-3.1ubuntu5.1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     1.16.33-3.1ubuntu5 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
cmake-data:
  Installed: (none)
  Candidate: 2.8.7-0ubuntu5
  Version table:
     2.8.7-0ubuntu5 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     2.8.7-0ubuntu4 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
mysql-server-5.5:
  Installed: 5.5.44-0ubuntu0.12.04.1
  Candidate: 5.5.46-0ubuntu0.12.04.2
  Version table:
     5.5.46-0ubuntu0.12.04.2 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
 *** 5.5.44-0ubuntu0.12.04.1 0
        100 /var/lib/dpkg/status
     5.5.22-0ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
mysql-server-core-5.5:
  Installed: 5.5.46-0ubuntu0.12.04.2
  Candidate: 5.5.46-0ubuntu0.12.04.2
  Version table:
 *** 5.5.46-0ubuntu0.12.04.2 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.5.22-0ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

修正する source.listに以下を追加しました。

deb http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
deb http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
deb-src http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages

次に、apt-get アップデートを実行します。エラーは次のとおりです。

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/amd64/source/Sources  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/Packages/source/Sources  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/amd64/binary-amd64/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/Packages/binary-amd64/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/amd64/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/Packages/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/precise-updates/main/amd64/source/Sources  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/precise-updates/main/Packages/source/Sources  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/precise-updates/main/amd64/binary-amd64/Packages  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/precise-updates/main/Packages/binary-amd64/Packages  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/precise-updates/main/amd64/binary-i386/Packages  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/precise-updates/main/Packages/binary-i386/Packages  404  Not Found [IP: 91.189.91.14 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

ベストアンサー1

通常、最初のステップは次のとおりです。

 sudo apt-get install mysql-server=5.5.46-0ubuntu0.12.04.2 mysql-server-5.5=5.5.46-0ubuntu0.12.04.2

しかし、それはあなたの場合ではありません。

apt-get download mysql-server mysql-server-5.5
sudo dpkg -i --force-all mysql-server*.deb

おすすめ記事