Installing Heroku cli on archlinux using snapd: command not found

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

using snapd for a Manjaro based linux distribution

It was installed successfully and just to make sure that

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 check the CLI installation using this cmd

heroku --version

      

I get

bash: heroku: command not found

      

+4


source to share


3 answers


This usually means that the directory where you installed your package is not included in your $ PATH.

Look at the output

echo $PATH

      

and export the path to the directory containing the heroku executable if not already included.



Read more about exporting paths here .

The original .bashrc file (or .zshrc if you are on ZSH) may be required after export.

To check if the export was successful, you can enter which heroku

and confirm the same.

Hooray!

0


source


You can run like this:

    snap run heroku

      



Examples:

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

      

0


source


I just installed herooku using a snap and had the same problem. I also noticed that I can run herooku using sudo .

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

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

      

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

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

      

I removed that ~ / .cache / heroku / and everything was fine.

0


source







All Articles