2

Each time I run "sudo apt-get install package-name", the following error happened, even if I tried to install other packages other than mysql ones:

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

For example: When I downloaded mysql-5.5.44 and tried to install it by running "cmake .", it told me that cmake is not installed. When I run "sudo apt-get install cmake", the below error happened.

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

UPDATE

Found lots of similar question on this site, but still stuck in the problem. My source.list:

# 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

Output of running: apt-cache policy 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

UPDATE I added the following to 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

Then, runn apt-get update. The error is:

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.
  • cmake to install MySQL? Probably not. Edit your question and add the output of apt-cache policy cmake libxmlrpc-core-c3 cmake-data mysql-server-5.5 mysql-server-core-5.5 – A.B. Dec 2 '15 at 20:35
  • @A.B. post already updated. Because it complains that one package is missing. so I downloaded the source code and tried to cmake it and install it. – BAE Dec 2 '15 at 20:47
  • First run sudo apt-get install mysql-server-5.5=5.5.46-0ubuntu0.12.04.2 and give me the output. – A.B. Dec 2 '15 at 20:48
  • 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: mysql-server-5.5 : Breaks: mysql-server (< 5.5.46-0ubuntu0.12.04.2) but 5.5.44-0ubuntu0.12.04.1 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). – BAE Dec 2 '15 at 20:49
  • 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-data : Depends: emacsen-common 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). – BAE Dec 2 '15 at 20:50
2

Usually the first step is:

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

But not in your case, therefore

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.