Hari
Hari

Reputation: 1623

How to run iex as normal user?

I'm following this link to install elixir and erlang on fedora 21... After i installed when i tried to run interactive elixir(iex) i get the following error

/home/hari/.asdf/installs/elixir/1.4.2/bin/elixir: line 126: exec: erl: not found

Commands i used to install :

asdf install erlang 19.0
asdf install elixir 1.3.2

But if i run as a root user its working correctly!!! What's the mistake im commiting here?

Upvotes: 0

Views: 797

Answers (1)

Aleksei Matiushkin
Aleksei Matiushkin

Reputation: 121010

It’s a path issue. Please do the following to detect the problem root:

sudo su -c 'which erl' 
#⇒ /usr/local/bin/erl # OR LIKE

It seems that this directory is not on your user’s path. Add it to test:

export PATH=`dirname $(sudo su -c 'which erl')`:$PATH

Try running elixir (it should succeed.) Now just put the hardcoded path in the very end of your shell start script (~/.bashrc if you use bash, etc):

export PATH=/usr/local/bin:$PATH

Upvotes: 4

Related Questions