How do I install a specific version of erlang?

2019-04-29 06:14发布

I have inherited a project with a puppet/vagrant/Virtual box setup. The vagrant provision is breaking around my erlangs surrounding rabbitmq-server.

the error:

==> default: err: /Stage[main]/Rabbitmq::Install/Package[rabbitmq-server]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install rabbitmq-server' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: Some packages could not be installed. This may mean that you have
==> default: requested an impossible situation or if you are using the unstable
==> default: distribution that some required packages have not yet been created
==> default: or been moved out of Incoming.
==> default: The following information may help to resolve the situation:
==> default:
==> default: The following packages have unmet dependencies:
==> default:  rabbitmq-server : Depends: erlang-nox (>= 1:16.b.3) but it is not going to be installed or
==> default:                             esl-erlang but it is not installable
==> default:                    Depends: init-system-helpers (>= 1.13~) but it is not installable
==> default: E: Unable to correct problems, you have held broken packages.

I have gone through the steps listed http://www.scotthelm.com/2013/11/27/rabbit-mq-and-erlang-and-ubuntu-oh-my.html. I installed erlang and erlagn-nox, but when i run erl my version shows as R14B04 when i want the r16 that rabbitmq plays well with. How do I install a specific version of erlang?

Currently I have tried sudo apt-get install erlang=1:16.b.3-dfsg-1ubuntu2 but it can't be found. Have tried several variations but no luck. My other idea is to download the tar itself and build it, but this seems excessive and it seems like I am missing something more obvious.

4条回答
Melony?
2楼-- · 2019-04-29 06:37

You can use kerl to install different Erlang/OTP on the same machine.

查看更多
Luminary・发光体
3楼-- · 2019-04-29 06:39

you cau use Erlang-Solutions repositories:

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang=1:19.3.6
查看更多
够拽才男人
4楼-- · 2019-04-29 06:42

You may also check solution called EVM

here is the detailed information : https://github.com/robisonsantos/evm

查看更多
兄弟一词,经得起流年.
5楼-- · 2019-04-29 06:46

First download the required version from http://erlang.org/download

wget http://www.erlang.org/download/otp_src_R16B01.tar.gz
tar -xvzf otp_src_R16B01.tar.gz
sudo chmod -R 777 otp_src_R16B01
cd otp_src_R16B01
sudo ./configure
sudo make
sudo make install

All the best

查看更多
登录 后发表回答