我在我的操作系统中安装了Erlang / OPT 20,并且凤凰框架显示以下错误消息:
当我运行命令时:
iex -S mix
我明白了:
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
** (Version.InvalidRequirementError) ~> 1.3 or ~> 1.4
(elixir) lib/version.ex:159: Version.match?/3
(mix) lib/mix/local.ex:100: Mix.Local.check_elixir_version_in_ebin/1
(elixir) lib/enum.ex:645: Enum."-each/2-lists^foreach/1-0-"/2
(elixir) lib/enum.ex:645: Enum.each/2
(mix) lib/mix/local.ex:50: Mix.Local.append_archives/0
(mix) lib/mix/cli.ex:8: Mix.CLI.main/1
我升级前后的Erlang 19它打破了凤凰。要降级到旧版本,我尝试从official website下载后手动安装它我无法用安装程序替换(系统理解新版本更好,所以不要求替换)。
然后我尝试使用此命令行完全删除它:
sudo apt-get purge erlang
令我惊讶的是它不会删除:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'erlang' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
“未安装包'erlang',因此未删除”
答案 0 :(得分:3)
我用这个命令行解决了这个问题:
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
我来自this post
答案 1 :(得分:1)
我通过以下方式解决
升级/降级erlang版本
https://github.com/asdf-vm/asdf
升级/降级灵丹妙药版本
$ git clone https://github.com/elixir-lang/elixir.git
$ cd长生不老药
$ git checkout v1.6(v1.4,v1.5,v1.7)//用于降级或升级
$ sudo apt-get install make
$进行彻底测试
$ sudo make install
$ elixir -v