我已经阅读了这里的许多帖子,它们都指出要运行以下命令:
- apt-get -f 删除**
- apt-get 更新
- apt-get 升级
- apt-get -f 安装**
我以各种顺序等方式查看了这些内容,但没有一个能解决我的问题。无论我怎么尝试,我都会得到:
apt-get -f install mysql-server Reading package
lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
tinyca mailx
The following NEW packages will be installed:
mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/14.9 MB of archives.
After this operation, 53.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously unselected package mysql-server-core-5.5.
(Reading database ... 83134 files and directories currently installed.)
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.29-
0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-server-5.5.
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb)
...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.29-0ubuntu0.12.04.1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) ...
invoke-rc.d: initscript mysql, action "start" failed.
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):
No apport report written because the error message indicates its a followup error from a
No apport report written because the error message indicates its a followup error from a
previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
过去一周我尝试了几种方法,但都无法解决这个问题,任何帮助都将不胜感激。我确实注意到了以下消息:
软件包 mysql-server-5.5 尚未配置。
我还没有配置好,所以我正在研究这方面的问题。如果有任何其他帮助,我将不胜感激。
答案1
Titanicx 的解决方案对我有用。
dpkg -S etc/mysql
发现问题出在 mysql-common 上。彻底删除 MySQL:
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
答案2
我以前也遇到过这个问题。配置包后,MySQL Daemon 就会立即启动,如果 MySQL 配置出现任何错误或访问数据目录出现问题,则作业将失败。
在这种情况下,检查 MySQL 错误日志/var/log/mysql/error.log
可以帮助您。
就我的情况而言,访问错误是由装甲:
150131 19:38:23 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
只需通过编辑适当的 apparmor 文件即可解决此问题。
答案3
我的问题是,我/tmp
在其他地方建立了符号链接,但 Apparmor 不喜欢它。
编辑/etc/apparmor.d/abstractions/user-tmp
并添加真实路径来/tmp
修复它并允许 MySQL 成功启动。
(灵感的源泉)
答案4
对我来说这很简单
apt-get autoremove
得到:
Setting up mysql-server-5.5 (5.5.38-1~dotdeb.0) ...
update-rc.d: warning: /etc/init.d/mysql missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
mysql start/running, process 21373