无法在 Raspbian (Buster) 上安装 RabbitMQ,因为 Erlang 不是正确的版本,即使它说它是最新的

Unable to install RabbitMQ on Raspbian (Buster) because Erlang isn't the correct version, even though it says it's up to date

我对 Raspberry Pi 和 Linux/Debian 很陌生,所以请多多包涵。我已经尝试了几个小时在我的 Raspberry Pi 3 上安装 rabbitMQ,但无济于事。我按照这些步骤操作,但最后每当我尝试编写 sudo apt-get install rabbitmq-server :

时,我都会得到这个
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 rabbitmq-server : Depends: erlang-base (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            erlang-base-hipe (>= 1:21.3) but it is not installable or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-crypto (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-eldap (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-inets (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-mnesia (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-os-mon (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-parsetools (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-public-key (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-runtime-tools (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-ssl (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-syntax-tools (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-tools (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-xmerl (>= 1:21.3) but 1:21.2.6+dfsg-1 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
E: Unable to correct problems, you have held broken packages.

看到这里,我意识到我的 Erlang 版本不正确,需要 1:21.3,而不是 1:21.2,所以我去更新了它,但它接着说:

pi@raspberrypi:~ $ sudo apt-get install erlang
Reading package lists... Done
Building dependency tree       
Reading state information... Done
erlang is already the newest version (1:21.2.6+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我查看了 Erlang 网站,它只是说写入 apt-get install erlang 使其工作,但出于某种原因它只想保留版本 1:21.2.6,而不是 22.2这似乎是最新版本。有人有什么建议吗?

经过 Franva 的评论,我改进了我的答案。

转到页面:https://www.rabbitmq.com/install-debian.html#manual-installation 在页面中搜索"Manual Installation with Dpkg",您将找到下载link。 目前(2020 年 6 月 4 日)文件是 "rabbitmq-server_3.8.4-1_all.deb" 下载该文件并将其移动到 raspberry pi.

转到页面:https://www.erlang-solutions.com/resources/download.html 并下载 raspbian buster 的最新版本。

然后在 Raspbian 中输入

sudo apt-get remove erlang*

然后使用

安装从erlang网站下载的erlang包
sudo dpkg -i name_of_the_erlang_package.deb

使用

安装从 RabbitMQ 网站下载的 RabbitMQ 包
sudo dpkg -i rabbitmq-server_3.8.4-1_all.deb

安装完成后,键入以下命令:

sudo systemctl enable rabbitmq-server
sudo systemctl start rabbitmq-server
sudo rabbitmq-plugins enable rabbitmq_management

由于默认用户(来宾)只能从 localhost 访问 Web 管理控制台,您可以从您的树莓派和 chromium 类型登录

http://localhost:15672

并使用
登录 用户:客人
通行证:客人 然后您可以创建自己的用户并远程登录

或使用以下命令创建您自己的用户

sudo rabbitmqctl add_user your_username your_password
sudo rabbitmqctl set_user_tags your_username administrator
sudo rabbitmqctl set_permissions -p / your_username ".*" ".*" ".*"

并使用您的浏览器连接到管理控制台 http://ip_of_the_raspberry:15672