asdf: /usr/local/libexec/private/asdf-exec: No such file or directory
I was following this tutorial: https://www.mitchellhanberg.com/post/2017/10/05/installing-erlang-and-elixir-using-asdf/
$ asdf plugin-list
elixir
erlang
ruby
$ asdf current
elixir 1.7.4 (set by /Users/me/.tool-versions)
erlang 21.2 (set by /Users/me/.tool-versions)
ruby No version set for ruby; please run `asdf <global | local> ruby <version>`
$ elixir -v
/Users/me/.asdf/shims/elixir: line 4: /usr/local/libexec/private/asdf-exec: No such file or directory
/Users/me/.asdf/shims/elixir: line 4: exec: /usr/local/libexec/private/asdf-exec: cannot execute: No such file or directory
I could not find anything regarding my issue but I also did not find anything I might have missed in my installation
OS: macOs Sierra
asdf version: 0.6.2
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 13
- Comments: 19 (2 by maintainers)
This happened to me, not sure why, but I found a fix for it. It was working fine until today, maybe because oh-my-zsh upgraded this morning?
I installed asdf with homebrew and am using the
asdfzsh plugin, which tries to load files that don’t exist:If I look at the
~/.asdf/shims/rubyshim for example, it’s pointing to a folder that doesn’t exist:but my asdf is
/opt/homebrew/Cellar/asdf/0.9.0. If I doasdf reshim, nothing changes:Using
which, the correct paths seems to be:Solution
I removed
asdfplugin from~/.zshrc, and then ran the command to add zsh to the file:I started a new terminal session, and tried
ruby -vagain - no luck, same error.Then I deleted all of the shims in
~/.asdf/shimsand then ranasdf reshimagain, and it correctly set the shim paths:Seems like there’s an issue with asdf not reshimming correctly.
Yep. Same here. Weird that
reshimwouldn’t recreate the files on a version mismatch.Just commenting here that
rm -rf ~/.asdf/shims; asdf reshimworks for me as well. It broke kubectx and kubectl in my case.rm -rf ~/.asdf/shims; asdf reshimfixes the errors for me. I can runyarn startnow.By turning the command into
sudo ln -s /usr/local/opt/asdf/libexec/ /usr/local/libexecyou make it version unaware 😉
I had the same problem. To fix simply edit
/Users/me/.asdf/shims/elixirand change the/usr/local/libexec/private/asdf-execto/usr/local/Cellar/asdf/0.6.2/libexec/private/asdf-exec. I think it is caused because I had an old asdf 0.6.0 which was missing the.zshrcactivation (source /usr/local/opt/asdf/asdf.sh).I had the problem for nodejs and python
running this, avoids the edition of all shims:
Some rogue homebrew command bumped me from 0.8.1 to 0.9 today for asdf, and I ran into the same issue with Elixir/Erlang via asdf. @bbugh solution above ☝️ worked for me
Ah. Looks like https://github.com/asdf-vm/asdf/issues/531 is open to address that. But googling “shims asdf no such file or directory” led me to this issue first.
Happening for me also. Is there a fix planned so users don’t have to hack around creating symlinks?
Thank you very much @look4regev it worked for me.
I just installed asdf v0.6.2 from homebrew so it is not due to an old version for me