简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM