mysql - Ubuntu 20 无法卸载 mysql 服务器
问题描述
我试图使用 apt-get purge mysql-server 卸载 mysql,但卸载不成功,现在它阻止了 mariadb 的安装。
petter@server:~$ sudo dpkg -P --force-all mysql-server-8.0
(Reading database ... 71256 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.22-0ubuntu0.20.04.3) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--purge):
installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
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 not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
mysql-server-8.0
解决方案
可能有些丢失的文件,请先尝试重新安装它--reinstall
,然后再修剪它
推荐阅读
- wxpython - Windows 10下wxPython FileDialog默认文件名空白
- javascript - Next.js 的每页布局组件没有从 Vercel 的 swr 全局配置中获得价值
- node.js - 我需要在我的后端服务器中只允许 https 吗?[节点]
- reactjs - 找不到模块:无法解析“react-bootstrap/Media”
- reactjs - Reactjs Rest API 响应解码 JSON
- jquery - Jquery 编辑 css 字体系列值
- java - 如何以最佳方式处理“无法通过子选择加载集合:”
- python - 如果我收到此特定错误,我该如何重试?
- azure - 如何将格式化日期插入 Azure DevOps“经典”发布管道的文件名?
- java - 如何为 RestController 配置 SpringBoot 认证