6
votes

I am trying to install elixir in ubuntu... I had followed this instructions.

Everthing seems fine, but when I try to execute the mix comand, system asnwered me this:

bash: /usr/bin/mix: No such file or directory

Thanks you.

4
Is that the exact error message? Can you paste the exact one if it's not? - Dogbert
Hi @Dogbert It says bash, not bahs... and the output is in spanish... But yes It is exactly the error message. - Eloy Fernández Franco
It says "/user/bin_mix"? - Dogbert
Ouch!! Sorry, sorry, sorry... I am editting - Eloy Fernández Franco
Maybe you forgot to cd into directory where mix.exs file is available ( mix isn't a global command that works everywhere) - Alex Avoiants

4 Answers

4
votes

Just ran into the same problem. The guide you linked installs mix to /usr/local/bin/mix instead of /usr/local/mix. I created a symlink /usr/bin/mix but expanding $PATH is probably a better way to fix this.

~$ mix
-bash: /usr/bin/mix: No such file or directory
~$ which mix
/usr/local/bin/mix
~$ sudo ln -s /usr/local/bin/mix /usr/bin/mix
~$ mix
** (Mix) Could not find a Mix.Project, please ensure a mix.exs file is available
1
votes

in my case i have installed elixir using sudo so when you try to call it without sudo you'll get this error.

0
votes

Also ran into this. In my case it stemmed from having CDPATH set.

Unsetting it for the session with unset CDPATH and retrying did the trick.

0
votes

In my case I reinstalled Erlang via sudo apt-get install erlang-base and during installation, Elixir got removed altogether.

Fixed that by running sudo apt-get install elixir.

All repositories were preset for me already.