我想在 Ubuntu 10.04 上卸载 RabbitMQ,并发出以下命令:
sudo apt-get --purge autoremove rabbitmq-server
它会卸载所有依赖项,例如 erlang 库,但无法删除 rabbitmq-server 本身。
当我重复上述命令时,我得到:
(Reading database ... 26297 files and directories currently installed.)
Removing rabbitmq-server ...
* Stopping message broker rabbitmq-server
* message broker already stopped
[ OK ]
invoke-rc.d: initscript rabbitmq-server, action "stop" failed.
dpkg: error processing rabbitmq-server (--purge):
subprocess installed pre-removal script returned error exit status 3
* Starting message broker rabbitmq-server
* FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
[fail]
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
我下一步该怎么做才能彻底删除该包?谢谢!
答案1
我会这样做:
尝试删除它而不进行其他选择:sudo apt-get remove rabbitmq-server
看看是否有效,如果不有效,则可能会出现新的错误消息。
如果卸载脚本需要服务器运行,在运行命令之前启动服务器可能会有所帮助。如果无法再启动,我会尝试破解脚本以返回退出代码来0
欺骗脚本。
在某些事情奏效之后,我会选择--purge
然后autoremove
。