Livebook server: command not found: livebook

I thought I’d have a go at livebook, so I followed the instructions at Home - Livebook.dev but when I do livebook server, I get an error:

zsh: command not found: livebook

It looks like maybe asdf puts things somewhere in the PATH that is not expected? I can launch the command with the fully qualified location, e.g.

/Users/myuser/.asdf/installs/elixir/1.13.2-otp-24/.mix/escripts/livebook server

I’m wondering if others have encountered this problem and if maybe a note should be added to the docs?

Thanks for any input!

2 Likes

Have you tried asdf reshim elixir <version> ? Core | asdf

6 Likes

What does asdf current return in the directory that you’re trying to run livebook from?

1 Like

I tried running asdf reshim elixir 1.13.0-otp-24

It got no errors, but still it doesn’t seem happy:

❯ livebook server
No preset version installed for command livebook
Please install a version by running one of the following:

asdf install elixir 1.13.0-otp-24

I’m confused now more than ever because asdf current DOES show the same versions installed that I had when I started kicking tires:

❯ asdf current
elixir          1.13.0-otp-24   /path/to/repo/.tool-versions
erlang          24.1.7          /path/to/repo/.tool-versions
nodejs          15.4.0          /path/to/repo/.tool-versions
1 Like

Based on the path in your first post it looks like you’ve installed livebook in 1.13.2-otp-24 and are trying to run it in 1.13.0-otp-24 which doesn’t have the livebook command. If you are in a directory where asdf current reports 1.13.2-otp-24 then you can install livebook inside that elixir version with mix escript.install hex livebook.

4 Likes

Thank you for your comments. The problem was that my global Elixir version was different than the one used by my particular repo, so the mix escript.install ended up out of sync with the repo. Or something like that. Anyhow, once my bash profile version matched the Elixir version in the repo, things worked.