Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm quite new to Raspberry Pi and Linux/Debian, so please bear with me. I have been trying for hours now to install rabbitMQ on my Raspberry Pi 3, to no avail. I followed the steps, but in the end I just get this whenever I try to write 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.

After seeing this, I realize that my Erlang wasn't the correct version, and needs to be 1:21.3, instead of 1:21.2, so I went to go and update it, but it then says:

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.

I looked on the Erlang web site and it just says write apt-get install erlang to make it work, but for some reason it just wants to stay at version 1:21.2.6, instead of the 22.2 that seems to be a latest version. Does anyone have any advice?

like image 849
Steven Teglman Avatar asked Mar 11 '20 23:03

Steven Teglman


People also ask

Do I need Erlang for RabbitMQ?

It is highly recommended that the same major version of Erlang is used across all cluster nodes (e.g. 25. x). RabbitMQ will check for internal protocol versions of Erlang and its distributed libraries when a node joins a cluster, refusing to cluster if there's a potentially incompatible combination detected.

Why Erlang is used for RabbitMQ?

It is implemented in Erlang OTP, a technology tailored for building stabe, reliable, fault tolerant and highly scalable systems which possess native capabilities of handling very large numbers of concurrent operations, such as is the case with RabbitMQ and other systems like WhatsApp, MongooseIM, to mention a few.

How do I check RabbitMQ version?

You can also use the rabbitmq-diagnostics to check the server_version. It's a useful tool for diagnostics, health checks and monitoring. The command assumes that accessing your console requires sudo rights. Look for a line saying something like RabbitMQ version: 3.8.


1 Answers

After Franva's comment, I have improved my answer.

Go to the page: https://www.rabbitmq.com/install-debian.html#manual-installation Search for "Manual Installation with Dpkg" in the page and you will find the download link. At the moment (4th June 2020) the file is "rabbitmq-server_3.8.4-1_all.deb" Download that file and move it into the raspberry pi.

Go to the page: https://www.erlang-solutions.com/resources/download.html and download the latest version for raspbian buster.

Then in Raspbian type

sudo apt-get remove erlang*

Then install the erlang package you have downloaded from the erlang website using

sudo dpkg -i name_of_the_erlang_package.deb

Install the RabbitMQ package you have downloaded from the RabbitMQ website using

sudo dpkg -i rabbitmq-server_3.8.4-1_all.deb

When the installation is over type the following commands:

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

Since the default user (guest) accesses to the web management console only from localhost, you can either log in from your raspberry and from chromium type

http://localhost:15672

and login with
user: guest
pass: guest You can then create your own user and log in with it remotely

OR create your own user with the following commands

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

and connect to the management console from your browser using http://ip_of_the_raspberry:15672

like image 56
TicoTicoTacoTaco Avatar answered Sep 22 '22 08:09

TicoTicoTacoTaco