MySQL 5.6 dpkg 安装错误,即使在完全卸载之后

meu*_*un5 6 mysql dpkg

从下载的 deb 和 apt 安装 MySQL 5.6 时出现错误:

nginx@LBNginx:/tmp$ sudo dpkg -i mysql-server-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb
(Reading database ... 121037 files and directories currently installed.)
Preparing to unpack mysql-server-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-5.6 (5.6.27-0ubuntu0.14.04.1) over (5.6.27-0ubuntu0.14.04.1) ...
Setting up mysql-server-5.6 (5.6.27-0ubuntu0.14.04.1) ...
2015-10-27 19:31:17 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-10-27 19:31:17 0 [Note] /usr/sbin/mysqld (mysqld 5.6.27-0ubuntu0.14.04.1) starting as process 7666 ...
2015-10-27 19:31:17 7666 [Note] Plugin 'FEDERATED' is disabled.
2015-10-27 19:31:17 7666 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-27 19:31:17 7666 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-27 19:31:17 7666 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-27 19:31:17 7666 [Note] InnoDB: Memory barrier is not used
2015-10-27 19:31:17 7666 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-10-27 19:31:17 7666 [Note] InnoDB: Using Linux native AIO
2015-10-27 19:31:17 7666 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-27 19:31:17 7666 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-27 19:31:17 7666 [Note] InnoDB: Completed initialization of buffer pool
2015-10-27 19:31:17 7666 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-27 19:31:17 7666 [Note] InnoDB: 128 rollback segment(s) are active.
2015-10-27 19:31:17 7666 [Note] InnoDB: Waiting for purge to start
2015-10-27 19:31:17 7666 [Note] InnoDB: 5.6.27 started; log sequence number 1626007
2015-10-27 19:31:17 7666 [Note] Binlog end
2015-10-27 19:31:17 7666 [Note] InnoDB: FTS optimize thread exiting.
2015-10-27 19:31:17 7666 [Note] InnoDB: Starting shutdown...
2015-10-27 19:31:19 7666 [Note] InnoDB: Shutdown completed; log sequence number 1626017
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.6 (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mysql-server-5.6
Run Code Online (Sandbox Code Playgroud)

我已经从系统中完全删除了 MySQL 并再次尝试,但仍然无济于事。

注意:我正在运行 Ubuntu Server Trusty

pl_*_*ock 8

首先mysql-server使用命令完全删除:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
Run Code Online (Sandbox Code Playgroud)

然后尝试再次安装它。

sudo apt-get install mysql-server
Run Code Online (Sandbox Code Playgroud)

如果您使用 dpkg 命令安装并且它显示对其他软件包的任何依赖,则运行命令:

sudo apt-get install -f 
Run Code Online (Sandbox Code Playgroud)

然后再次尝试安装

编辑: 是错误,mysql-server-5.6因此请尝试较低版本的mysql-server. 如果要安装,mysql-server-5.6则可以使用PPA。

在下面创建任何文件 /etc/apt/sources.list.d/

sudo vi /etc/apt/sources.list.d/mysql.list
Run Code Online (Sandbox Code Playgroud)

并粘贴以下行并保存。

deb http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu trusty main 
deb-src http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu trusty main 
Run Code Online (Sandbox Code Playgroud)

并更新它

sudo apt-get update 
Run Code Online (Sandbox Code Playgroud)

然后使用命令安装它

sudo apt-get install mysql-server-5.6
Run Code Online (Sandbox Code Playgroud)

它在Ubuntu 14.04. 这里是PPA提供的Ubuntu版本12.0414.0414.1015.0415.10