Installing Heroku cli on archlinux using snapd :command not found
Asked Answered
G

3

6

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
Getup answered 10/7, 2017 at 14:33 Comment(3)
I was facing the same issue. Try rebooting system and then using heroku commands.Sadiron
try this wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | shSadiron
Rebooting the system worked for me (although logging out and back in would probably have sufficed).Fradin
K
2

It generally means that the directory in which you have installed your package is not included in your $PATH.

Look at the output of

echo $PATH

and export the path of the directory containing heroku's executable if it's not already included.

Read more about exporting paths here.

You might want to source your .bashrc file (or .zshrc if you are on ZSH) after exporting.

To check if the export is successful, you can type in which herokuand confirm the same.

Cheers!

Kamenskuralski answered 26/7, 2017 at 11:38 Comment(1)
heroku is installed at /snap/bin so add that to your PATHWellspoken
A
2

You can run like this:

    snap run heroku

Examples:

    snap run heroku --version
    snap run heroku login -i
Activism answered 21/1, 2019 at 3:59 Comment(0)
C
1

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.

Conservation answered 5/6, 2019 at 17:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.