无法安装rabbitmq,因为Erlang依赖项的版本不正确

hlswsv35  于 2022-11-08  发布在  RabbitMQ
关注(0)|答案(3)|浏览(148)

我安装了erlang 21.3

$ erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().'  -noshell
"21"

但是rabbitmq安装程序并不这么认为:

sudo apt-get install -y 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:20.2.2+dfsg-1ubuntu2 is to be installed or
                            erlang-base-hipe (>= 1:21.3) but it is not going to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-crypto (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-eldap (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-inets (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-mnesia (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-os-mon (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-parsetools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-public-key (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-runtime-tools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-ssl (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-syntax-tools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-tools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
                            esl-erlang (>= 1:21.3) but it is not installable
                   Depends: erlang-xmerl (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 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.

注意:以下问题类似-但对于RedHatyum install指令不直接适用于apt-getInstalling RabbitMQ on Red Hat - wrong Erlang version
需要做些什么来修复这个安装过程?我在ubuntu 18.0.4上。

dpiehjr4

dpiehjr41#

下面的命令序列将在Ubuntu 18上安装Erlang和RabbitMQ,如here所述:

export DEBIAN_FRONTEND=noninteractive

apt-get update -y

apt-get install curl gnupg -y

curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | apt-key add -

apt-get install apt-transport-https

tee /etc/apt/sources.list.d/bintray.rabbitmq.list <<EOF
deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang
deb https://dl.bintray.com/rabbitmq/debian bionic main
EOF

apt-get update -y

apt-get install rabbitmq-server -y --fix-missing

until lsof -i:5672; do echo "Waiting for RabbitMQ to start..."; sleep 1; done
rabbitmq-plugins enable rabbitmq_management

如果您选择从源代码安装Erlang,您只能自己安装,我建议您使用generic-unix RabbitMQ包。

**注意:**RabbitMQ团队监控rabbitmq-users邮件列表,仅在某些时候回答StackOverflow上的问题。

brc7rcf0

brc7rcf02#

我在安装Elixir时遇到了类似的问题。我相信原因是现有的Erlang安装阻止了两个不同软件包提供的所需Erlang版本的安装。
对我来说,安装esl-erlang和elixir解决了这个问题,例如,sudo apt-get install elixir esl-erlang。所以,你可能想显式安装所需的erlang-base或esl-erlang版本。

zvokhttg

zvokhttg3#

最近在安装rabbitmq时遇到了类似的情况。

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb

sudo apt-get update
sudo apt-get install erlang
sudo apt-get install esl-erlang

正如所描述的,here对我很有效

相关问题