Installing RabbitMQ on Red Hat - wrong Erlang version

末鹿安然 提交于 2020-02-24 14:07:01

问题


I'm trying to install RabbitMQ on an evaluation VM of Red Hat (Enterprise Linux 7 64-bit workstation version) following the instructions at https://www.rabbitmq.com/install-rpm.html.

I've gone and installed the zero-dependency version of Erlang from the source at https://github.com/rabbitmq/erlang-rpm. That installed without error and I added its /bin directory to my path.

When I then try to install RabbitMQ using yum install rabbitmq-server-3.7.4-1.el7.noarch.rpm, it fails and tells me it needs Erlang version >= 19.3, even though I installed the latest version of Erlang at the time (OTP v20.3) from the source. Below is the full output from when I try to install 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:


I found out on my own how to get the right version of Erlang so that Rabbit MQ will install on my version of Red Hat. Here's what I did:

In /etc/yum.repos.d I created a rabbitmq-erlang.repo file with the following contents:

# 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

Then I installed Rabbit MQ using the following commands, and it was able to automagically install the right version of Erlang I needed:

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


来源:https://stackoverflow.com/questions/49562295/installing-rabbitmq-on-red-hat-wrong-erlang-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!