gpt4 book ai didi

mysql - 从 Debian 8.3 中完全删除 MySQL

转载 作者:太空宇宙 更新时间:2023-11-04 12:57:31 26 4
gpt4 key购买 nike

我确实尝试了一切。

stackoverflow里几乎每一个答案,我仍然无法删除MySQL

The following packages were automatically installed and are no longer required:libdbi-perl libterm-readkey-perl Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: mysql-server-5.5* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 32.5 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 25587 files and directories currently installed.) Removing mysql-server-5.5 (5.5.47-0+deb8u1) ... Failed to stop mysql.service: Unit mysql.service not loaded. invoke-rc.d: initscript mysql, action "stop" failed. dpkg: error processing package mysql-server-5.5 (--purge): subprocess installed pre-removal script returned error exit status 5 Failed to stop mysql.service: Unit mysql.service not loaded. invoke-rc.d: initscript mysql, action "stop" failed. Failed to start mysql.service: Unit mysql.service failed to load: No such >file or directory. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 6 Errors were encountered while processing: mysql-server-5.5 E: Sub-process /usr/bin/dpkg returned an error code (1)

这正在成为一场噩梦。我在 google 上来回搜索,我尝试了我发现的一切,从清除包、自动清理、自动删除、删除目录、关闭服务等。

我仍然遇到错误。

我正在认真考虑全新安装。

最佳答案

基本上这意味着安装/删除脚本之一出现问题。

/var/lib/dpkg/info/ 中检查名为 mysql-server 的脚本

我有:

mysql-server-5.5.conffiles
mysql-server-5.5.config
mysql-server-5.5.list
mysql-server-5.5.md5sums
mysql-server-5.5.postinst
mysql-server-5.5.postrm
mysql-server-5.5.preinst
mysql-server-5.5.prerm
mysql-server-5.5.templates
mysql-server-core-5.5.list
mysql-server-core-5.5.md5sums
mysql-server.list
mysql-server.md5sums

将 exit 0 添加到脚本 .prerm.postrm 第一行之后的顶部 #!/bin/bash

然后你应该可以执行 apt-get purge mysql-server

这可能会在您的系统上留下一些悬空文件,因此请尝试再次运行软件包安装过程,然后正确清除它们,这应该会删除所有内容。

关于mysql - 从 Debian 8.3 中完全删除 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35319393/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com