Rabbitmq 安装报:/usr/lib/rabbitmq/bin/rabbitmq-server: line 85: erl: command not found

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

部署环境:CentOS Linux release 7.3.1611 (Core) 

Erlang:20.1

Rabbitmq:3.7.12

问题描述:在使用命令/sbin/service rabbitmq-server start启动Rabbitmq时,报:

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.

根据以上错误信息,使用“journalctl -xe”命令查看启动失败日志:

[root@192 bin]# journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rabbitmq-server.service has begun starting up.
1月 08 19:12:46 sanyue rabbitmq-server[10306]: /usr/lib/rabbitmq/bin/rabbitmq-server: line 85: erl: command not found
1月 08 19:12:46 sanyue systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=127/n/a
1月 08 19:12:46 sanyue rabbitmqctl[10473]: /usr/lib/rabbitmq/bin/rabbitmqctl: line 32: exec: escript: not found
1月 08 19:12:46 sanyue systemd[1]: rabbitmq-server.service: control process exited, code=exited status=127
1月 08 19:12:46 sanyue systemd[1]: Failed to start RabbitMQ broker.
-- Subject: Unit rabbitmq-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rabbitmq-server.service has failed.
-- 
-- The result is failed.

Rabbitmq 安装报:/usr/lib/rabbitmq/bin/rabbitmq-server: line 85: erl: command not found_第1张图片

通过上面描述中,发现是rabbitmq-server文件第85没有找到erlang。

解决方法:在rabbitmq-server文件第85行处添加erlang的环境变量

Rabbitmq 安装报:/usr/lib/rabbitmq/bin/rabbitmq-server: line 85: erl: command not found_第2张图片

然后执行启动Rabbitmq命令,启动成功。使用/sbin/service rabbitmq-server status查看rabbit状态

Rabbitmq 安装报:/usr/lib/rabbitmq/bin/rabbitmq-server: line 85: erl: command not found_第3张图片

转载于:https://my.oschina.net/u/2289161/blog/1603934

你可能感兴趣的:(Rabbitmq 安装报:/usr/lib/rabbitmq/bin/rabbitmq-server: line 85: erl: command not found)