我正在按照以下步骤在ubuntu 16上安装 rabbitmq
echo "deb http://www.rabbitmq.com/debian/ testing main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list > /dev/null
wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc
sudo apt-get update
sudo apt-get install rabbitmq-server -y
sudo service rabbitmq-server start
sudo rabbitmq-plugins enable rabbitmq_management
sudo service rabbitmq-server restart
执行 >> sudo apt-get install rabbitmq-server -yi 后出现以下错误
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:18.3-dfsg-1ubuntu3.1 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:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-eldap (>= 1:21.3) but 1:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-inets (>= 1:21.3) but 1:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-mnesia (>= 1:21.3) but 1:18.3-dfsg-1ubuntu3.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:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-parsetools (>= 1:21.3) but 1:18.3-dfsg-1ubuntu3.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:18.3-dfsg-1ubuntu3.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:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-ssl (>= 1:21.3) but 1:18.3-dfsg-1ubuntu3.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:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-tools (>= 1:21.3) but 1:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-xmerl (>= 1:21.3) but 1:18.3-dfsg-1ubuntu3.1 is to be installed or
esl-erlang (>= 1:21.3) but it is n
解决问题的第一步是恢复命令的效果。
让我们从您的第一个命令开始。
这是创建一个文件
/etc/apt/sources.list.d/rabbitmq.list
。所以你想删除这个文件。要删除文件,请运行以下命令。您的下一个命令是下载文件。
如果您知道文件的下载位置,则可以删除该文件。它应该下载到执行命令的目录中。如果您刚刚打开一个终端,它很可能在您的主目录中。
下一个命令是使用 apt-key 添加一个 gpg 密钥。所以你必须删除 gpg 密钥。请参阅此如何删除我使用 apt-key add - 添加的 gpg 密钥的答案?.
现在您已经删除了 gpg 密钥。你应该跑
sudo apt update
您现在可以按照官方说明安装 RabbitMQ 。官方说明不是最好的组织。但是我试图提炼 ubuntu 16.04 的命令。
第一步是安装 Erlang。运行以下命令。这里我只是从链接复制命令。
现在你应该已经安装了 Erlang。现在您可以安装 RabbitMQ。您应该运行以下命令。
你现在应该已经安装了 RabbitMQ。