我在通过 APT 安装时遇到依赖问题rabbitmq-server
。我添加了 2 个文件/etc/apt/sources.list.d
:bintray.rabbitmq.list
和rabbitmq_rabbitmq-server.list
bintray.rabbitmq.list
包含:
deb https://dl.bintray.com/rabbitmq/debian bionic erlang-22.1
deb https://dl.bintray.com/rabbitmq/debian bionic main
rabbitmq_rabbitmq-server.list
包含:
deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ bionic main
deb-src https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ bionic main
我有 Ubuntu 19.04 bionic。
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<br> installable
E: Unable to correct problems, you have held broken packages.
$ apt-cache policy rabbitmq-server
rabbitmq-server:
Installed: (none)
Candidate: 3.8.0-1
Version table:
500 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu bionic/main i386 Packages
3.6.10-1 500
500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
500 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages
答案1
Ubuntu 19.04 有一个不同的代码名称所以我假设你的意思是你正在使用 Ubuntu 18.04。
仔细阅读这些说明。您必须固定 Erlang 版本,并且可能不应混合 bintray 和 packagecloud 资源。
下面Vagrantfile
成功安装了最新的 Erlang 和 RabbitMQ 包。您应该能够根据自己的需要进行调整。
$script = <<SCRIPT
apt-get install -y sudo
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 | sudo 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
date > /etc/vagrant_provisioned_at
SCRIPT
Vagrant.configure('2') do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.hostname = 'UBUNTU-18-2'
config.vm.provision 'shell', inline: $script
end
笔记:RabbitMQ 团队监控rabbitmq-users
邮件列表并且仅有时回答 StackOverflow 上的问题。