我正在尝试在我的 Ubuntu 20.04.3 LTS(focal) 中安装 rabbitmq-server,安装时请遵循以下步骤:
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get install rabbitmq-server
所有步骤都正常,除了当我尝试通过sudo apt-get install rabbitmq-server
几分钟后输入来安装它时出现下面给出的错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up rabbitmq-server (3.9.7-1) ...
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2021-09-29 22:54:48 +06; 6ms ago
Process: 18045 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 18045 (code=exited, status=1/FAILURE)
Status: "Standing by"
dpkg: error processing package rabbitmq-server (--configure):
installed rabbitmq-server package post-installation script subprocess 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 systemctl status rabbitmq-server.service
和
sudo journalctl -xe
这应该说明什么配置导致服务无法启动。