在Red Hat上安装RabbitMQ - 错误的Erlang版本

时间:2018-03-29 17:49:32

标签: erlang rabbitmq redhat

我正按照https://www.rabbitmq.com/install-rpm.html的说明尝试在Red Hat评估虚拟机(Enterprise Linux 7 64位工作站版)上安装RabbitMQ。

我已经离开并从https://github.com/rabbitmq/erlang-rpm的来源安装了Erlang的零依赖版本。安装没有错误,我将其/ bin目录添加到我的路径。

当我尝试使用yum install rabbitmq-server-3.7.4-1.el7.noarch.rpm安装RabbitMQ时,它失败并告诉我它需要Erlang版本> = 19.3,即使我当时安装了最新版本的Erlang(OTP v20.3)来源。以下是我尝试安装RabbitMQ时的完整输出:

$ sudo yum install rabbitmq-server-3.7.4-1.el7.noarch.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
              : manager
Examining rabbitmq-server-3.7.4-1.el7.noarch.rpm: rabbitmq-server-3.7.4-1.el7.noarch
Marking rabbitmq-server-3.7.4-1.el7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.7.4-1.el7 will be installed
--> Processing Dependency: erlang >= 19.3 for package: rabbitmq-server-3.7.4-1.el7.noarch
--> Processing Dependency: socat for package: rabbitmq-server-3.7.4-1.el7.noarch
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.7.4-1.el7 will be installed
--> Processing Dependency: erlang >= 19.3 for package: rabbitmq-server-3.7.4-1.el7.noarch
---> Package socat.x86_64 0:1.7.3.2-2.el7 will be installed
--> Finished Dependency Resolution
Error: Package: rabbitmq-server-3.7.4-1.el7.noarch (/rabbitmq-server-3.7.4-1.el7.noarch)
           Requires: erlang >= 19.3
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

Error: Package: rabbitmq-server-3.7.4-1.el7.noarch (/rabbitmq-server-3.7.4-1.el7.noarch)
           Requires: erlang >= 19.3
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

1 个答案:

答案 0 :(得分:0)

我自己发现了如何获得正确版本的Erlang,以便Rabbit MQ将安装在我的Red Hat版本上。这就是我的所作所为:

/etc/yum.repos.d中,我创建了一个rabbitmq-erlang.repo文件,其中包含以下内容:

# In /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/19/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1

然后我使用以下命令安装了Rabbit MQ,它能够自动安装我需要的正确版本的Erlang:

rpm --import https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
yum install rabbitmq-server-3.7.4-1.el7.noarch.rpm