Command in $PATH not found

bashterminal

I've created a symlink using:

sudo ln -s ~/Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin

I can see the command ebook-convert in /usr/local/bin.

Then I've added /usr/local/bin in my $PATH. I can see it when doing echo $PATH.

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

But I still can't use ebook-convert from terminal and I get the error:

-bash: ebook-convert: command not found

What am I missing?

Best Answer

To analyze problems like that it helps to

  • check whether the target of the symlink exists (ls -l ~/Applications/calibre.app/Contents/MacOS/ebook-convert)
  • check whether the target is executable
  • verify whether the shell sees the file in question (type ebook-convert)

Doing so made me realize that Calibre was installed in /Applications instead of ~/Applications.