由于错误版本的erlang依赖项而无法安装rabbitmq

问题描述 投票:1回答:2

我已安装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-get Installing RabbitMQ on Red Hat - wrong Erlang version

要修复此安装过程需要做什么?我在ubuntu 18.0.4上。

rabbitmq erlang
2个回答
1
投票

安装elixir时遇到类似问题。我相信原因是现有的erlang安装阻止了两个不同软件包提供的erlang所需版本的安装。

对我来说,与elixir一起安装esl-erlang解决了此问题,例如sudo apt-get install elixir esl-erlang。因此,您可能需要显式安装所需版本的erlang-base或esl-erlang。


0
投票

以下命令序列将在here中记录在Ubuntu 18上安装Erlang和RabbitMQ:

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软件包。


[NOTE: RabbitMQ团队监视rabbitmq-users mailing list,并且有时仅在StackOverflow上回答问题。

© www.soinside.com 2019 - 2024. All rights reserved.