dpkg总是尝试安装mysql-server-5.7
每当我尝试安装任何东西时,它总是安装mysql-server-5.7。
我尝试了sudo apt-get install php-mbstring
但它首先尝试安装mysql-server-5.7。 我不知道出了什么问题。
我收到了以下错误
Reading package lists... Done Building dependency tree Reading state information... Done php-mbstring is already the newest version (1:7.0+35ubuntu6). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? \[Y/n\] y Setting up mysql-server-5.7 (5.7.13-0ubuntu0.16.04.2) ... Renaming removed key_buffer and myisam-recover options (if present) dpkg: error processing package mysql-server-5.7 (--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.7; however: Package mysql-server-5.7 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured 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.7 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)]
这是附件
我遇到了同样的问题。 在我的情况下,它揭示了由于某些原因我在/ tmp / something /中运行带有sock文件的mysql-server(也许它是由dpkg启动的,因为我在启动时没有启用mysql?)。 我杀死了mysqlserver(kill -9)并且正常启动了mysql服务(服务mysql启动)。
然后我运行sudo dpkg --configure -a
。 更新脚本时会抛出一个错误的低“thread_stack”,这在mysqld.cnf(/ etc / mysql)中很容易改变。 重新启动mysql服务,再次运行dpkg --configure -a
瞧 – 升级没问题。
操作系统:Ubuntu16.04.1
我遇到了类似的问题:
Dpkg:包error handlingmysql-server( – configure):依赖问题 – 处理时遇到未配置的错误:mysql-server mysql-server-5.7
所以我按照建议做了:
sudo dpkg –configure mysql-server-5.7
然后我注意到:
Mysql_upgrade:收到错误:1045:连接到MySQL服务器时,用户“Debian-sys-maint”@“localhost”(使用密码:YES)拒绝访问
所以,我只需要为Debian-sys-maint用户添加权限。
博客文章很好地解释了推理和方法的细节(法语): http : //www.linuxaddict.fr/index.php/2013/12/24/comment-regler-lerreur-dacces-de-debian- SYS-MAINT -丹斯MySQL的/
总结一下:
- 编辑/etc/mysql/my.cnf并取消注释theise行或添加它们以启用mysql登录以便了解发生的事情:
general_log_file = /var/log/mysql/mysql.log general_log = 1
- 重启mysql服务:
sudo /etc/init.d/mysql reload
- 然后我遇到了这个错误(拒绝用户访问):
错误:’访问被拒绝用户’debian-sys-maint’@’localhost’(使用密码:YES)’
- 因此,请记下文件/etc/mysql/debian.cnf中的密码并为该用户授予权限:
mysql -u root -p
mysql>授予所有特权。 TO’debian-sys-maint’@’localhost’通过’您的密码’识别;mysql> FLUSH PRIVILEGES;
MySQL的“退出
MySQL的“再见
- 重新启动mysql并再次尝试安装:
sudo /etc/init.d/mysql restart