Version 2.4 bad install
sysmat opened this issue · 13 comments
- using elixir-websetup.exe
- install otp 2.5
- install elixir
- in cmd I get error:
❯ elixir --version
Cannot find file at 'c:\program files\erl-24.0\erts-12.0\bin\erl.exe' (c:\program files\erl-24.0\erts-12.0\bin\erl.exe)
@chyndman it seems that the installer may still be picking 24.0 or similar from the registry?
@sysmat did you have a previous Erlang version on the system? Or perhaps two versions at the same time? What happens if you install Erlang and then go through the installer again?
Yes I had previous version of Erlang and I uninstalled it and then installed by elixir-windows-setup
elixir from where is reading erl bin path?
From the registry, I believe it is from around here: https://github.com/elixir-lang/elixir-windows-setup/blob/master/src/ErlangInstall.iss#L20 - can you find anything in your registry around that area?
Erlang populates registry keys at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Ericsson\Erlang
. We try to figure out which subkey is the latest version.
ElixirWeb.iss uses this just to determine whether Erlang should be installed or not. Elixir.iss offers to append this to the system PATH
variable. We don't attempt to remove it on uninstall. So it is likely you have an old Erlang directory still in your PATH
.
- @chyndman no I doubled check PATH env and file system, and there is nothing
- my bad solution is to patch Elixir\binqelixir.bat file
set ERTS_BIN=C:\Program Files\Erlang OTP\bin\
- in elixir file
ERTS_BIN=C:/Program\ Files/Erlang\ OTP/bin/
You can try where erl.exe
in a command prompt to be extra-sure it isn't in PATH
. In Windows there's both a User PATH
and a System PATH
variable.
Setting ERTS_BIN
also works as you discovered from the elixir.bat
file.
@josevalim Is ERTS_BIN
only referenced by elixir.bat
or does it come from Erlang/OTP upstream? It might be worth discussing with the Erlang/OTP team that their installer should handle PATH
or ERTS_BIN
updates.
It is only referenced in "elixir.bat".
I've used Elixir for years (mostly on mac with asdf which is really nice) -- but this installer for Windows is driving me nuts.
I've tried clearing my PATH, reinstalling everything, etc. and it's just not finding Erlang :(
(note: trying to use OTP 25 64 bit)
$ elixir -v
/c/Program Files (x86)/Elixir/bin/elixir: line 248: exec: erl: not found
I got it working after setting new installation locations and doing it manually.
@DarkMarmot sorry for your frustration, thanks for reporting your experience.
I got it working after setting new installation locations and doing it manually.
What specifically did you change? Some of your environment variables and/or the elixir.bat
file?
We are now building and shipping offline Elixir installers which are built as part of CI. See the up to date instructions on elixir-lang.org to learn more. :)