首先执行命令
erl
是正常进去的,说明已经安装了erlang,而且也配置了环境变量
百度看到了说是在报错的 /usr/lib/rabbitmq/bin/rabbitmq-server文件里再加erlang的环境变量配置
#!/bin/sh
# vim:sw=4:et:
## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
##
## Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.
##
set -e
export PATH=$PATH:/usr/local/erlang/bin
# Get default settings with user overrides for (RABBITMQ_)<var_name>
# Non-empty defaults should be set in rabbitmq-env
...
加了再执行`systemctl stop rabbitmq-server`还是一样报错
然后发现执行下面命令能正常启动,只是退出界面后有自动关闭了
#/usr/lib/rabbitmq为安装目录
sh /usr/lib/rabbitmq/bin/rabbitmq-server
其实bin目录下面的rabbitmq-server链接的是bin同级目录下lib里面的rabbitmq文件下的sbin目录下到rabbitmq-server
也就是/usr/lib/rabbitmq/lib/rabbitmq_server-3.11.5/sbin/rabbitmq-server
进入sbin目录执行下面命令就正常后台启动
./rabbitmq-server -detached
#或
sh rabbitmq-server -detached
关闭执行(还是sbin目录下)
rabbitmqctl stop
安装这个rabbitmq真的各种坑,各种错
文章来源:https://www.toymoban.com/news/detail-631267.html
文章来源地址https://www.toymoban.com/news/detail-631267.html
到了这里,关于启动rabbitmq报错 rabbitmq-server: line 70: exec: erl: not found的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!