taylor / kiex

Elixir version manager
http://taylor.github.io/kiex/
MIT License
766 stars 65 forks source link

Failed to find erlang release file! #30

Closed shivakumaarmgs closed 8 years ago

shivakumaarmgs commented 8 years ago

I'm couldn't install Elixir in my Fedora-22 machine. I have already installed Erlang using dnf but when I try to install Elixir with the command kiex install master it says

Failed to find the erlang release file!
That Elixir requires Erlang R17 or later
Erlang installation choices:
   * Download - https://www.erlang-solutions.com/downloads/download-erlang-otp
                http://www.erlang.org/download.html
   * Kerl - https://github.com/spawngrid/kerl
   * Package manager -
           Arch: See AUR package,
           FreeBSD: pkg install erlang
           OS X: brew install erlang
           Ubuntu/Debian/CentOS see erlang-solutions.com

But I have a working version of Erlang 17

$ erl                                                                                                                                                  ruby-2.2.0 
Erlang/OTP 17 [erts-6.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.3  (abort with ^G)
1> 
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
v
Erlang (BEAM) emulator version 6.3
Compiled on Thu Aug  6 16:00:20 2015

BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution

Information on the OS

$ lsb_release -a 
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Fedora
Description:    Fedora release 22 (Twenty Two)
Release:    22
Codename:   TwentyTwo

$ uname -a
Linux local-machine 4.1.6-200.fc22.x86_64

Is there a way to fix this?

GalaxyGorilla commented 8 years ago

I have the same setup and here is the problem: https://github.com/taylor/kiex/blob/master/kiex#L126

The right path has to be /usr/lib64/erlang/releases/RELEASES

while the script yields: /usr/lib64/erlang/erts-6.3/bin/../releases/RELEASES

Hence adding one more '/..' fixes the problem. Under Kubuntu 15.04 the path is the same as on Fedora, so I guess this is no packaging problem.

sebyx07 commented 8 years ago

i still get the error the error of not finding the erlang release file. I'm trying to build a docker image


# install erlang
RUN kerl build 18.0 18.0
RUN mkdir ~/.kerl/installs/ && mkdir ~/.kerl/installs/18.0
RUN kerl install 18.0 ~/.kerl/installs/18.0
RUN echo ". ~/.kerl/installs/18.0/activate" >> ~/.bashrc
RUN echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc

# install elixir
RUN \curl -sSL https://raw.githubusercontent.com/taylor/kiex/master/install | bash -s
RUN echo 'test -s "$HOME/.kiex/scripts/kiex" && source "$HOME/.kiex/scripts/kiex"' >> ~/.bashrc
RUN /bin/bash -c 'source ~/.bashrc && kiex install 1.0.5 && kiex default 1.0.5'
GalaxyGorilla commented 8 years ago

I just had to use kiex on an elementary and had to revert my PR to get this running. The problem is that with 'readlink -f $(which erl 2> /dev/null)' you get the erl executable in the erlang/erts*/bin folder or in the erlang/bin folder (probably depending on your package). If yours is the latter case my last PR breaks kiex for you. Sorry for this :/

Maybe a check should be built in to see where the release file resides.

EDIT: I'll have a look at this tomorrow.

shivakumaarmgs commented 8 years ago

Elixir version 1.1.1 is successfully installed after #31. Closing this.