Installing Heroku cli on archlinux using snapd :command not found

Viewed 3003

I have installed heroku cli following their ref https://devcenter.heroku.com/articles/heroku-cli

using snapd on Manjaro arch-based linux distro

It was installed successfully and just to make sure

When I run this cmd

sudo snap install heroku

I get

snap "heroku" is already installed, see "snap refresh --help"

but when I try to verify the CLI installation using this cmd

heroku --version

I get

bash: heroku: command not found
3 Answers

You can run like this:

    snap run heroku

Examples:

    snap run heroku --version
    snap run heroku login -i

I have heroku just installed using snap and had the same issue. Also, I noticed that I could run heroku using sudo.

The executable was placed in /snap/bin/heroku, so i just did this (considering /usr/bin is already in $PATH):

sudo ln -s /snap/bin/heroku /usr/bin/heroku

Since I had previously run heroku with sudo, the directory ~/.cache/heroku/ , owned by root, was created. So I got an error message when first ran the command as non-root:

Error Plugin: heroku: EACCES: permission denied, open '/home/carlos.brasileiro/.cache/heroku/lastrun'

I removed that ~/.cache/heroku/ and it got ok.

Related