无法在干净的 ubuntu 12.04 LTS 服务器上安装 mysql-server(5.5.22)

无法在干净的 ubuntu 12.04 LTS 服务器上安装 mysql-server(5.5.22)

我有一个干净的最小安装的 Ubuntu 12.04 LTS 服务器 64 位(只有 root 用户,没有安装任何其他东西)。我尝试使用以下命令安装 mysql-server:

apt-get install mysql-server

安装因以下错误而中止:

The following NEW packages will be installed:
  libdbd-mysql-perl{a} libmysqlclient18{a} mysql-client mysql-client-5.5{a}
  mysql-client-core-5.5{a} mysql-common{a} mysql-server mysql-server-5.5{a}
  mysql-server-core-5.5{a}
0 packages upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.7 kB/26.2 MB of archives. After unpacking 94.5 MB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://mirror.eu.oneandone.net/ubuntu/ubuntu/ precise/main mysql-client all 5.5.22-0ubuntu1 [11.7 kB]
Fetched 11.7 kB in 0s (567 kB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 54008 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.22-0ubuntu1_all.deb) ...
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.22-0ubuntu1_amd64.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_amd64.deb) ...
Selecting previously unselected package mysql-client-core-5.5.
Unpacking mysql-client-core-5.5 (from .../mysql-client-core-5.5_5.5.22-0ubuntu1_amd64.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.22-0ubuntu1_amd64.deb) ...
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.22-0ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.5.22-0ubuntu1) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 54189 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb) ...
Selecting previously unselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_5.5.22-0ubuntu1_all.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.22-0ubuntu1_all.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up libmysqlclient18 (5.5.22-0ubuntu1) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up mysql-client-core-5.5 (5.5.22-0ubuntu1) ...
Setting up mysql-client-5.5 (5.5.22-0ubuntu1) ...
Setting up mysql-server-core-5.5 (5.5.22-0ubuntu1) ...
Setting up mysql-server-5.5 (5.5.22-0ubuntu1) ...
120502 10:17:41 [Note] Plugin 'FEDERATED' is disabled.
120502 10:17:41 InnoDB: The InnoDB memory heap is disabled
120502 10:17:41 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120502 10:17:41 InnoDB: Compressed tables use zlib 1.2.3.4
120502 10:17:41 InnoDB: Initializing buffer pool, size = 128.0M
120502 10:17:41 InnoDB: Completed initialization of buffer pool
120502 10:17:41 InnoDB: highest supported file format is Barracuda.
120502 10:17:41  InnoDB: Waiting for the background threads to start
120502 10:17:42 InnoDB: 1.1.8 started; log sequence number 1595675
120502 10:17:42  InnoDB: Starting shutdown...
120502 10:17:42  InnoDB: Shutdown completed; log sequence number 1595675
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up mysql-client (5.5.22-0ubuntu1) ...
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 mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up mysql-server-5.5 (5.5.22-0ubuntu1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing 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 mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

我完全不知所措,因为我已经尝试了网上的所有方法来解决我的问题(清除安装、使用 dpkg 重新配置、手动编辑 my.cnf)。我还设置了一个新的全新安装,但没有任何帮助。我做错了什么?

新信息:安装后,文件 /var/log/upstart/mysql.log 包含以下错误:

AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'

答案1

答案2

幸运的是,我的安装没有遇到任何问题。首先,我安装了“Synaptic 包管理器”,并在笔记本电脑上试用了最新版本的 mysql (5.5.22-0ubuntu1) 客户端和服务器。一切顺利,现在我正在将它用于我的项目。

请在安装 synaptic 和给定的版本后尝试一下。

相关内容