文章目录
-
复现问题
-
分析问题
-
解决问题
4.如何安装Erlang和RabbitMq -
复现问题
今天在安装Erlang和RabbitMq完成后,在cmd窗口中输入如下命令:
rabbitmq-plugins enable rabbitmq_management
却报出了如下错误:
D:\Software\RabbitMQ Server\rabbitmq_server-3.10.7\sbin>rabbitmq-plugins enable rabbitmq_management
=ERROR REPORT==== 31-Aug-2022::17:09:36 ===
beam/beam_load.c(1862): Error loading module rabbitmqctl_escript:
This BEAM file was compiled for a later version of the run-time system than 20.
To fix this, please recompile this module with an 20 compiler.
(Use of opcode 169; this emulator supports only up to 159.)
escript: exception error: undefined function rabbitmqctl_escript:main/1
in function escript:run/2 (escript.erl, line 759)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1 (init.erl, line 1085)
in call from init:do_boot/3 (init.erl, line 793)
即escript: exception error: undefined function rabbitmqctl_escript:main/1,翻译成中文是escript: 异常错误: 未定义的函数 rabbitmqctl_escript:main/1。
-
分析问题
经过查询网上的资料得知,导致此问题的情况可能有多种,此处导致此情况的是erlang/otp版本与rabbitmq不匹配导致。 -
解决问题
要么重新下载erlang/otp版本,要么重新下载与rabbitmq。
如下是重新安装完成的截图:
ming/RabbitMQ/advanced.config
2023-01-30 16:59:38.452000+08:00 [notice] <0.44.0> Application syslog exited with reason: stopped
2023-01-30 16:59:38.453000+08:00 [notice] <0.229.0> Logging: switching to configured handler(s); following messages may not be visible in this log output
## ## RabbitMQ 3.11.7
## ##
########## Copyright (c) 2007-2023 VMware, Inc. or its affiliates.
###### ##
########## Licensed under the MPL 2.0. Website: https://rabbitmq.com
Erlang: 25.2.1 [jit]
TLS Library: OpenSSL - OpenSSL 1.1.1s 1 Nov 2022
Release series support status: supported
Doc guides: https://rabbitmq.com/documentation.html
Support: https://rabbitmq.com/contact.html
Tutorials: https://rabbitmq.com/getstarted.html
Monitoring: https://rabbitmq.com/monitoring.html
Logs: <stdout>
c:/Users/dW0012771/AppData/Roaming/RabbitMQ/log/rabbit@WINDOWS-ORTIVOH.log
c:/Users/dW0012771/AppData/Roaming/RabbitMQ/log/rabbit@WINDOWS-ORTIVOH_upgrade.log
Config file(s): c:/Users/dW0012771/AppData/Roaming/RabbitMQ/advanced.config
Starting broker... completed with 3 plugins.