Reputation: 660
I installed the Erlang/OPT 20 in my OS and the phoenix framework show the following error message:
When I run the command:
iex -S mix
I get:
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
I had the Erlang 19 before and after the upgrade it broke the phoenix. To downgrade to the older version I tried to install it manually after download from the official website I couldn't replace with the installer (the system understands that the newer is better so don't ask to substitute).
Then I tried to remove it completely using this command line:
sudo apt-get purge erlang
and for my surprise it doens't remove:
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.
"Package 'erlang' is not installed, so not removed"
Upvotes: 3
Views: 7760
Reputation: 2314
I solved by following way
upgrading/downgrade erlang version
https://github.com/asdf-vm/asdf
upgrading/downgrade elixir version
$ git clone https://github.com/elixir-lang/elixir.git
$ cd elixir
$ git checkout v1.6 (v1.4,v1.5,v1.7) //for downgrading or upgrading
$ sudo apt-get install make
$ make clean test
$ sudo make install
$ elixir -v
Upvotes: 2
Reputation: 660
I solved this problem with this command lines:
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
I got from this post
Upvotes: 5