问题描述
我正在尝试将最新版本(在撰写本文时为20.3版)安装到RHEL7中(确切地说是7.5版)。
Google告诉我最新的Erlang发行版由维护,网址为(谢谢!)
您还可以找到有关如何添加存储库的说明,以便可以使用软件包管理器安装Erlang:
但是如果我运行命令(我以根用户身份运行rpm命令),则不会在 yum repolist
中添加Erlang Solutions仓库。 RHEL7是否与Centos不同,或者说明是否有误或我做错了什么?
Erlang Solutions仓库(以及安装说明)也从
我找到了根本原因,并且能够从Erlang Solutions存储库中安装Erlang。
根本原因是 $ releasever
在RHEL中与在Centos中不同,因此无法使用该变量,而必须将其更改为硬编码值。
以下为详细d步骤说明如何设置yum,以便可以使用yum从Erlang Solutions和EPEL存储库中安装Erlang及其依赖项。
添加以下Erlang Solutions存储库文件:
[root @ red〜]#cat /etc/yum.repos.d/erlang-solutions.repo
[erlang-解决方案]
name = CentOS $ releasever-$ basearch-Erlang Solutions
baseurl = https://packages.erlang-solutions.com/rpm/centos/7/$basearch
enabled = 1
gpgcheck = 1
gpgkey = https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
[root @ red〜]#
请注意,baseurl必须从
https://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch
至
https://packages.erlang-solutions.com/rpm/centos/7/$basearch
也添加EPEL存储库以满足Erlang所需的依赖性(wxBase,wxGTK,wxGTK-gl):
[root @ red〜]#rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch。 rpm
重新抛光现在看起来:
[root @ red〜]#yum repolist
已加载的插件:langpacks,product-id,search-disabled-repos,subscription-manager
repo id repo名称状态
epel / x86_64 Enterprise Linux 7的额外软件包-x86_64 12,517
erlang-solutions / x86_64 CentOS 7Server-x86_64-Erlang Solutions 992
rhel-7-server-extras-rpms / x86_64 Red Hat Enterprise Linux 7服务器-附加(RPM)814
rhel-7-server-optional-rpms / 7Server / x86_64 Red Hat Enterprise Linux 7服务器-附加(RPM)14,947
rhel-7-server-rpms / 7Server / x86_64红帽企业Linux 7服务器(RPM) 20,120
rhel-7-server-rt-rpms / 7Server / x86_64实时红帽企业版Linux(RHEL 7服务器)(RPM)281
rhel-server-rhscl-7-rpms / 7Server / x86_64适用于Red Hat Enterprise Linux的Red Hat Software Collections RPMs 9,961
repolist:59,632
[root @ red〜]#
Erlang包可用!
[root @ red〜]#yum info erlang
加载的插件:langpacks,产品ID,搜索禁用的仓库,订阅管理器
可用软件包
名称:erlang
拱形:x86_64
版本:20.3
版本:1.el7.centos
大小:17 k
回购:erlang-solutions / x86_64
摘要:通用编程语言和运行时环境
URL:http:/ /www.erlang.org
许可证:ERPL
说明:Erlang是一种通用的编程语言,运行时
是环境。 Erlang具有对并发,分发
和容错的内置支持。 Erlang用于爱立信的几个大型电信系统中。
[root @ red〜]#
最后,您可以安装Erlang使用 yum -y install erlang
。
已安装以下来自多个存储库的软件包:
=============================== ================================================== ==============================
软件包Arch版本库大小
====== ================================================== ================================================== ======
安装:
erlang x86_64 20.3-1.el7.centos erlang-solutions 17 k
安装依赖项:
SDL x86_64 1.2.15-14。 el7 rhel-7-server-rpms 204 k
erlang-asn1 x86_64 20.3-1.el7.centos erlang-solutions 9 28 k
erlang-common_test x86_64 20.3-1.el7.centos erlang-解决方案1.3 M
erlang-compiler x86_64 20.3-1.el7.centos erlang-solutions 1.4 M
erlang-cosEvent x86_64 20.3-1.el7.centos错误解决方案170 k
erlang-cosEventDomain x86_64 20.3-1.el7.centos错误解决方案137 k
erlang-cosFileTransfer x86_64 20.3-1.el7.centos错误解决方案200 k
erlang-cosNotification x86_64 20.3-1.el7.centos erlang-solutions 842 k
erlang-cosProperty x86_64 20.3-1.el7.centos erlang-solutions 188 k
erlang-cosTime x86_64 20.3-1.el7.centos erlang-solutions 124 k
erlang-cosTransactions x86_64 20.3- 1.el7.centos erlang解决方案196 k
erlang-crypto x86_64 20.3-1.el7.centos erlang解决方案212 k
erlang-debugger x86_64 20.3-1.el7.centos erlang解决方案468 k
erlang-dialyzer x86_64 20.3-1.el7.centos erlang-solutions 838 k
erlang-diameter x86_64 20.3-1.el7.centos erlang-solutions 835 k
erlang-edoc x86_64 20.3- 1.el7.centos erlang-solutions 366 k
erlang-eldap x86_64 20.3-1.el7.centos erlang-solutions 125 k
erlang-erl_docgen x86_64 20.3-1.el7.centos erlang-solutions 156 k
erlang-erl_interface x86_64 20.3-1.el7.centos erlang-solutions 263 k
erlang-erts x86_64 20.3-1.el7.centos erlang-solutions 2.0 M
erlang-et x86_64 20.3-1.el7.centos erlang-solutions 189 k
erlang-eunit x86_64 20.3-1.el7。 centos erlang-solutions 185 k
erlang-examples x86_64 20.3-1.el7.centos erlang-solutions 1.0 M
erlang-hipe x86_64 20.3-1.el7.centos erlang-solutions 3.2 M
erlang-ic x86_64 20.3-1.el7.centos erlang-solutions 1.0 M
erlang-inets x86_64 20.3-1.el7.centos erlang-solutions 921 k
erlang-jinterface x86_64 20.3-1.el7。 centos erlang-solutions 179 k
erlang-kernel x86_64 20.3-1.el7.cento s erlang-solutions 130万美元b $ b erlang-megaco x86_64 20.3-1.el7.centos erlang-solutions 6.0 M
erlang-mnesia x86_64 20.3-1.el7.centos erlang-solutions 915 k
erlang-observer x86_64 20.3-1.el7.centos erlang-解决方案980 k
erlang-odbc x86_64 20.3-1.el7.centos erlang-solutions 87 k
erlang-orber x86_64 20.3-1.el7。 centos erlang-solutions 110万美元b $ b erlang-os_mon x86_64 20.3-1.el7.centos erlang-solutions 135 k
erlang-otp_mibs x86_64 20.3-1.el7.centos erlang-solutions 33 k
erlang-parsetools x86_64 20.3-1.el7.centos erlang-solutions 208 k
erlang-publ ic_key x86_64 20.3-1.el7.centos erlang-解决方案689 k
erlang-reltool x86_64 20.3-1.el7.centos erlang-solutions 404 k
erlang-runtime_tools x86_64 20.3-1.el7.centos erlang -解决方案253 k
erlang-sasl x86_64 20.3-1.el7.centos erlang-solutions 342 k
erlang-snmp x86_64 20.3-1.el7.centos erlang-solutions 190万
erlang- ssh x86_64 20.3-1.el7.centos erlang-解决方案630 k
erlang-ssl x86_64 20.3-1.el7.centos erlang-solutions 969 k
erlang-stdlib x86_64 20.3-1.el7.centos erlang解决方案320万美元b $ b erlang-syntax_tools x86_64 20.3-1.el7.centos erlang-解决方案493 k
erlang-tools x86_64 20.3-1.el7.centos erlang-solutions 638 k
erlang-typer x86_64 20.3-1.el7.centos erlang-solutions 28 k
erlang -wx x86_64 20.3-1.el7.centos erlang-solutions 470万美元b $ b erlang-xmerl x86_64 20.3-1.el7.centos erlang-solutions 110万美元b $ b mesa-libGLU x86_64 9.0.0-4.el7 rhel-7-服务器-rpms 196 k
unixODBC x86_64 2.3.1-11.el7 rhel-7-服务器-rpms 413 k
wxBase x86_64 2.8.12-20.el7 epel 588 k
wxGTK x86_64 2.8.12-20.el7 epel 290万美元b $ b wxGTK-gl x86_64 2.8.12-20.el7 epel 34 k
交易摘要
======================== ================================================== ====================================
安装1个软件包(+54个从属软件包)
享受您的技术领先优势!
[jani @ red〜] $ cat / etc / redhat-release
红帽企业Linux服务器版本7.5(Maipo)
[jani @ red〜] $ erl
Erlang / OTP 20 [erts-9.3] [源] [64位] [smp:2:2] [ds:2:2:10] [异步线程:10] [hipe] [kernel-poll :false]
Eshell V9.3(用^ G中止)
1>
RabbitMQ安装说明,锁定已安装的erlang版本是个好主意。请参阅
[root @ red〜]#yum -y install yum-plugin-versionlock
[...]
[root @ red〜]#yum versionlock erlang wxBase wxGTK wxGTK-gl
已加载的插件:langpacks,product-id,search-disabled-repos,subscription-manager,versionlock
在以下位置添加版本锁定:0:wxGTK -2.8.12-20.el7
添加版本锁定:0:wxGTK-gl-2.8.12-20.el7
添加版本锁定:0:wxBase-2.8.12-20.el7
在以下位置添加版本锁:0:erlang-20.3-1.el7.centos
添加了版本锁:4
[root @ red〜]#
I'm trying to install an up to date (version 20.3 at the moment of the writing) Erlang distribution into RHEL7 (release 7.5 to be exact).
Google tells me the up-to-date Erlang distribution is maintained by Erlang Solutions at https://packages.erlang-solutions.com/ (thanks!)
There you also find instructions how to add the repository so that the Erlang can be installed with a package manager:
However if I run the commands (I run the rpm command as a root) no Erlang Solutions repo is added to yum repolist
. Is RHEL7 different to Centos or are the instructions faulty or what I'm doing wrong ?
The Erlang Solutions repo (and the installation instructions) is referenced also from
- https://www.rabbitmq.com/install-rpm.html
- https://elixir-lang.org/install.html#installing-erlang
- https://stackoverflow.com/a/38911475/272735
I found the root cause and was able to install Erlang from Erlang Solutions repository.
The root cause was that $releasever
is different in RHEL than in Centos and therefore the variable can't be used but has to be changed to a hardcoded value.
The following is a detailed steps how to setup yum so that Erlang and it's dependencies can be installed from Erlang Solutions and EPEL repositories with yum.
Add the following Erlang Solutions repository file:
[root@red ~]# cat /etc/yum.repos.d/erlang-solutions.repo
[erlang-solutions]
name=CentOS $releasever - $basearch - Erlang Solutions
baseurl=https://packages.erlang-solutions.com/rpm/centos/7/$basearch
enabled=1
gpgcheck=1
gpgkey=https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
[root@red ~]#
Note that baseurl had to be changed from
https://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch
to
https://packages.erlang-solutions.com/rpm/centos/7/$basearch
Add EPEL repository too for dependecies required by Erlang (wxBase, wxGTK, wxGTK-gl):
[root@red ~]# rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Repolist looks now:
[root@red ~]# yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
repo id repo name status
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,517
erlang-solutions/x86_64 CentOS 7Server - x86_64 - Erlang Solutions 992
rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 7 Server - Extras (RPMs) 814
rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 14,947
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 20,120
rhel-7-server-rt-rpms/7Server/x86_64 Red Hat Enterprise Linux for Real Time (RHEL 7 Server) (RPMs) 281
rhel-server-rhscl-7-rpms/7Server/x86_64 Red Hat Software Collections RPMs for Red Hat Enterprise Linux 9,961
repolist: 59,632
[root@red ~]#
Erlang package is available !
[root@red ~]# yum info erlang
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Available Packages
Name : erlang
Arch : x86_64
Version : 20.3
Release : 1.el7.centos
Size : 17 k
Repo : erlang-solutions/x86_64
Summary : General-purpose programming language and runtime environment
URL : http://www.erlang.org
License : ERPL
Description : Erlang is a general-purpose programming language and runtime
: environment. Erlang has built-in support for concurrency, distribution
: and fault tolerance. Erlang is used in several large telecommunication
: systems from Ericsson.
[root@red ~]#
And finally you can install Erlang with yum -y install erlang
.
The following packages from several different repositories were installed:
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Installing:
erlang x86_64 20.3-1.el7.centos erlang-solutions 17 k
Installing for dependencies:
SDL x86_64 1.2.15-14.el7 rhel-7-server-rpms 204 k
erlang-asn1 x86_64 20.3-1.el7.centos erlang-solutions 928 k
erlang-common_test x86_64 20.3-1.el7.centos erlang-solutions 1.3 M
erlang-compiler x86_64 20.3-1.el7.centos erlang-solutions 1.4 M
erlang-cosEvent x86_64 20.3-1.el7.centos erlang-solutions 170 k
erlang-cosEventDomain x86_64 20.3-1.el7.centos erlang-solutions 137 k
erlang-cosFileTransfer x86_64 20.3-1.el7.centos erlang-solutions 200 k
erlang-cosNotification x86_64 20.3-1.el7.centos erlang-solutions 842 k
erlang-cosProperty x86_64 20.3-1.el7.centos erlang-solutions 188 k
erlang-cosTime x86_64 20.3-1.el7.centos erlang-solutions 124 k
erlang-cosTransactions x86_64 20.3-1.el7.centos erlang-solutions 196 k
erlang-crypto x86_64 20.3-1.el7.centos erlang-solutions 212 k
erlang-debugger x86_64 20.3-1.el7.centos erlang-solutions 468 k
erlang-dialyzer x86_64 20.3-1.el7.centos erlang-solutions 838 k
erlang-diameter x86_64 20.3-1.el7.centos erlang-solutions 835 k
erlang-edoc x86_64 20.3-1.el7.centos erlang-solutions 366 k
erlang-eldap x86_64 20.3-1.el7.centos erlang-solutions 125 k
erlang-erl_docgen x86_64 20.3-1.el7.centos erlang-solutions 156 k
erlang-erl_interface x86_64 20.3-1.el7.centos erlang-solutions 263 k
erlang-erts x86_64 20.3-1.el7.centos erlang-solutions 2.0 M
erlang-et x86_64 20.3-1.el7.centos erlang-solutions 189 k
erlang-eunit x86_64 20.3-1.el7.centos erlang-solutions 185 k
erlang-examples x86_64 20.3-1.el7.centos erlang-solutions 1.0 M
erlang-hipe x86_64 20.3-1.el7.centos erlang-solutions 3.2 M
erlang-ic x86_64 20.3-1.el7.centos erlang-solutions 1.0 M
erlang-inets x86_64 20.3-1.el7.centos erlang-solutions 921 k
erlang-jinterface x86_64 20.3-1.el7.centos erlang-solutions 179 k
erlang-kernel x86_64 20.3-1.el7.centos erlang-solutions 1.3 M
erlang-megaco x86_64 20.3-1.el7.centos erlang-solutions 6.0 M
erlang-mnesia x86_64 20.3-1.el7.centos erlang-solutions 915 k
erlang-observer x86_64 20.3-1.el7.centos erlang-solutions 980 k
erlang-odbc x86_64 20.3-1.el7.centos erlang-solutions 87 k
erlang-orber x86_64 20.3-1.el7.centos erlang-solutions 1.1 M
erlang-os_mon x86_64 20.3-1.el7.centos erlang-solutions 135 k
erlang-otp_mibs x86_64 20.3-1.el7.centos erlang-solutions 33 k
erlang-parsetools x86_64 20.3-1.el7.centos erlang-solutions 208 k
erlang-public_key x86_64 20.3-1.el7.centos erlang-solutions 689 k
erlang-reltool x86_64 20.3-1.el7.centos erlang-solutions 404 k
erlang-runtime_tools x86_64 20.3-1.el7.centos erlang-solutions 253 k
erlang-sasl x86_64 20.3-1.el7.centos erlang-solutions 342 k
erlang-snmp x86_64 20.3-1.el7.centos erlang-solutions 1.9 M
erlang-ssh x86_64 20.3-1.el7.centos erlang-solutions 630 k
erlang-ssl x86_64 20.3-1.el7.centos erlang-solutions 969 k
erlang-stdlib x86_64 20.3-1.el7.centos erlang-solutions 3.2 M
erlang-syntax_tools x86_64 20.3-1.el7.centos erlang-solutions 493 k
erlang-tools x86_64 20.3-1.el7.centos erlang-solutions 638 k
erlang-typer x86_64 20.3-1.el7.centos erlang-solutions 28 k
erlang-wx x86_64 20.3-1.el7.centos erlang-solutions 4.7 M
erlang-xmerl x86_64 20.3-1.el7.centos erlang-solutions 1.1 M
mesa-libGLU x86_64 9.0.0-4.el7 rhel-7-server-rpms 196 k
unixODBC x86_64 2.3.1-11.el7 rhel-7-server-rpms 413 k
wxBase x86_64 2.8.12-20.el7 epel 588 k
wxGTK x86_64 2.8.12-20.el7 epel 2.9 M
wxGTK-gl x86_64 2.8.12-20.el7 epel 34 k
Transaction Summary
================================================================================================================
Install 1 Package (+54 Dependent packages)
Enjoy your leading edge toochain !
[jani@red ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
[jani@red ~]$ erl
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.3 (abort with ^G)
1>
RabbitMQ installation instructions says it's a good idea to lock installed erlang version. See How to restrict yum to install or upgrade a package to a fixed specific package version?
[root@red ~]# yum -y install yum-plugin-versionlock
[...]
[root@red ~]# yum versionlock erlang wxBase wxGTK wxGTK-gl
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager, versionlock
Adding versionlock on: 0:wxGTK-2.8.12-20.el7
Adding versionlock on: 0:wxGTK-gl-2.8.12-20.el7
Adding versionlock on: 0:wxBase-2.8.12-20.el7
Adding versionlock on: 0:erlang-20.3-1.el7.centos
versionlock added: 4
[root@red ~]#
这篇关于在RHEL7上安装最新版本的Erlang的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!