如何安装特定版本的Erlang/OTP?

disho6za  于 2022-12-08  发布在  Erlang
关注(0)|答案(6)|浏览(286)

我继承了一个有傀儡/流浪者/虚拟盒子设置的项目。流浪者的设置在我的rabbitmq服务器周围的erlangs周围被打破了。
错误:

==> 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.

我已经完成了http://www.scotthelm.com/2013/11/27/rabbit-mq-and-erlang-and-ubuntu-oh-my.html列出的步骤。我安装了erlang和erlagn-nox,但是当我运行erl时,我的版本显示为R14 B 04,而我想要r16,rabbitmq玩得很好。我如何安装特定版本的erlang?
目前我已经尝试了sudo apt-get install erlang=1:16.b.3-dfsg-1ubuntu2,但是找不到它。我尝试了几种变体,但是没有成功。我的另一个想法是下载tar本身并构建它,但是这似乎太过分了,而且似乎我错过了一些更明显的东西。

dy2hfwbg

dy2hfwbg1#

您需要使用Erlang-Solutions存储库:

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
icnyk63a

icnyk63a2#

您可以使用kerl在同一台机器上安装不同的Erlang/OTP。

r9f1avp5

r9f1avp53#

1. Remove previous Erlang versions/packages:

$ sudo apt-get purge erlang esl-erlang erlang-base erlang-crypto erlang-eldap erlang-inets erlang-mnesia erlang-os-mon
$ sudo apt-get autoremove
$ sudo apt-get install -f

$ sudo rm -rf /usr/lib/erlang
$ cd /usr/local/bin
$ sudo rm -f erl
$ sudo rm -f erlc
$ sudo rm -f epmd
$ sudo rm -f run_erl
$ sudo rm -f to_erl
$ sudo rm -f dialyzer
$ sudo rm -f typer
$ sudo rm -f escript
$ sudo rm -f ct_run

2. Add the repository entry manually:

  • To get Ubuntu codename type $ lsb_release -c . In my case it's xenial.
  • $ sudo nano /etc/apt/sources.list and add following text at the end of the file:
# Erlang Solutions
deb https://packages.erlang-solutions.com/ubuntu xenial contrib
  • Create a file /etc/apt/preferences.d/erlang :
$ sudo touch /etc/apt/preferences.d/erlang
$ sudo nano /etc/apt/preferences.d/erlang

with the following contents:

Package: erlang* esl-erlang
Pin: version 1:21.3*
Pin-Priority: 501

where 21.3 is the version of Erlang/OTP.

3. Install Erlang:

$ sudo apt-get update
$ sudo apt-get install esl-erlang
$ sudo ln -s /usr/lib/erlang/bin/erl /usr/local/bin/erl

4. Check installed Erlang version:

$ erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:fwrite(Version), halt().' -noshell

Related link:https://www.erlang-solutions.com/resources/download.html

j5fpnvbx

j5fpnvbx4#

首先从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

祝你一切顺利

v7pvogib

v7pvogib5#

You may also check solution called EVM
here is the detailed information : https://github.com/robisonsantos/evm

csbfibhn

csbfibhn6#

安装Erlang

cd /tmp/

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 -y

sudo apt-get install erlang -y

Install RabbitMQ from source

cd /tmp/

echo 'echo "deb http://www.rabbitmq.com/debian/ testing main" >> 
/etc/apt/sources.list' | sudo -s

wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc

sudo apt-key add rabbitmq-signing-key-public.asc

sudo apt-get update -y

sudo apt-get install rabbitmq-server -y

相关问题