我继承了一个带有puppet / vagrant / Virtual box设置的项目。流浪汉提供了围绕rabbitmq-server的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
时,我的版本显示为R14B04,当我想要兔子玩得很好的r16时。如何安装特定版本的erlang?
目前我已尝试sudo apt-get install erlang=1:16.b.3-dfsg-1ubuntu2
,但无法找到它。尝试了几种变化,但没有运气。我的另一个想法是下载tar本身并构建它,但这似乎过度,似乎我错过了一些更明显的东西。
答案 0 :(得分:23)
您谨慎使用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
答案 1 :(得分:2)
您可以使用kerl在同一台计算机上安装不同的Erlang / OTP。
答案 2 :(得分:1)
您还可以检查称为EVM的解决方案
答案 3 :(得分:1)
1。删除以前的Erlang版本/软件包:
$ 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。手动添加存储库条目:
要获取Ubuntu代号,请键入$ lsb_release -c
。在我的情况下是 xenial 。
$ sudo nano /etc/apt/sources.list
并在文件末尾添加以下文本:
# Erlang Solutions
deb https://packages.erlang-solutions.com/ubuntu xenial contrib
$ sudo touch /etc/apt/preferences.d/erlang
$ sudo nano /etc/apt/preferences.d/erlang
具有以下内容:
Package: erlang* esl-erlang
Pin: version 1:21.3*
Pin-Priority: 501
其中 21.3 是Erlang / OTP的版本。
3。安装Erlang:
$ sudo apt-get update $ sudo apt-get install esl-erlang $ sudo ln -s /usr/lib/erlang/bin/erl /usr/local/bin/erl
4。检查已安装的Erlang版本:
$ 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
相关链接: https://www.erlang-solutions.com/resources/download.html
答案 4 :(得分:0)
首先从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
祝一切顺利
答案 5 :(得分:0)
安装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