MySql 安装错误 Ubuntu 14.04

MySql 安装错误 Ubuntu 14.04

我已关注以下所有链接:

E:Mysql-server-5.5 安装错误

双启动ubuntu 14.04中的MySql安装问题

https://smyl.es/how-to-fix-mysql-server-depends-on-mysql-server-5-5-however-package-mysql-server-5-5-is-not-configured-yet/

但是在全新安装的 Ubuntu 14.04 上安装 mysql 时,我不断收到以下错误

start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

输出apt-cache policy

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://dl.google.com/linux/chrome/deb/ stable/main amd64 Packages
     release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
     origin dl.google.com
 500 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/ trusty/main Translation-en
 500 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/ trusty/main i386 Packages
     release v=14.04,o=LP-PPA-danielrichter2007-grub-customizer,a=trusty,n=trusty,l=Launchpad PPA for Grub Customizer,c=main
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/ trusty/main amd64 Packages
     release v=14.04,o=LP-PPA-danielrichter2007-grub-customizer,a=trusty,n=trusty,l=Launchpad PPA for Grub Customizer,c=main
     origin ppa.launchpad.net
 500 http://extras.ubuntu.com/ubuntu/ trusty/main i386 Packages
     release v=14.04,o=LP-PPA-app-review-board,a=trusty,n=trusty,l=Application Review Board PPA,c=main
     origin extras.ubuntu.com
 500 http://extras.ubuntu.com/ubuntu/ trusty/main amd64 Packages
     release v=14.04,o=LP-PPA-app-review-board,a=trusty,n=trusty,l=Application Review Board PPA,c=main
     origin extras.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/universe Translation-en
 500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted Translation-en
 500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse Translation-en
 500 http://security.ubuntu.com/ubuntu/ trusty-security/main Translation-en
 500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=multiverse
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/universe i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=universe
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=restricted
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=main
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=multiverse
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=universe
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=restricted
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=main
     origin security.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/universe Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/restricted Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/multiverse Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/main Translation-en
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/multiverse i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=multiverse
     origin be.archive.ubuntu.com
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/universe i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=universe
     origin be.archive.ubuntu.com
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/restricted i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=restricted
     origin be.archive.ubuntu.com
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/main i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=main
     origin be.archive.ubuntu.com
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/multiverse amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=multiverse
     origin be.archive.ubuntu.com
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/universe amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=universe
     origin be.archive.ubuntu.com
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/restricted amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=restricted
     origin be.archive.ubuntu.com
 100 http://be.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=main
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/universe Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/restricted Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/multiverse Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/main Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/multiverse i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=multiverse
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/universe i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=universe
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/restricted i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=restricted
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=main
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/multiverse amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=multiverse
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=universe
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=restricted
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=main
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/universe Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/restricted Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/multiverse Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/main Translation-en
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/multiverse i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=multiverse
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=universe
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/restricted i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=restricted
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=multiverse
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=universe
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/restricted amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=restricted
     origin be.archive.ubuntu.com
 500 http://be.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
     origin be.archive.ubuntu.com
Pinned packages:

输出apt-cache policy mysql-server-5.5

mysql-server-5.5:
  Installed: (none)
  Candidate: 5.5.50-0ubuntu0.14.04.1
  Version table:
     5.5.50-0ubuntu0.14.04.1 0
        500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     5.5.35+dfsg-1ubuntu1 0
        500 http://be.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

输出apt-cache policy mysql-server

mysql-server:
  Installed: (none)
  Candidate: 5.5.50-0ubuntu0.14.04.1
  Version table:
     5.5.50-0ubuntu0.14.04.1 0
        500 http://be.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     5.5.35+dfsg-1ubuntu1 0
        500 http://be.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

答案1

尝试使用以下命令:

sudo apt-get purge mysql-client-core-5.6
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mysql-client-core-5.5
sudo apt-get install mysql-server  

更详细的解决方法请参见这个问题

相关内容