How do I install heroku on ubuntu?
Asked Answered
S

5

6

I am trying to install heroku and for that it says i need to run this:

sudo snap install heroku --classic

but when i run that i get snap: command not found. when i looked up how to solve this it said i had to do this:

sudo apt update
sudo apt install snapd

but this does not work as well because it gives this:

apt: invalid flag: update

What do i do? How do i install heroku on aws cloud 9 linux?

Seaweed answered 3/9, 2019 at 6:9 Comment(0)
L
13

To install heroku on ubuntu,

curl https://cli-assets.heroku.com/install-ubuntu.sh | sh

But, this version does not autoupdate and must be updated manully via apt-get.

Otherwise, to install snap, follow this link:
https://askubuntu.com/questions/1050388/ubuntu-16-04-install-snapd-problem

Lutetium answered 3/9, 2019 at 6:56 Comment(7)
The first curl command returns sh: line 4: /etc/apt/sources.list.d/heroku.list: No such file or directorySeaweed
How about just sudo apt-get update; sudo apt-get install heroku-toolbelt heroku without snapLutetium
it says No package heroku-toolbelt available.No package heroku available. I found another way to do it. but im not sure if this works. heroku --version returns heroku/7.29.0 linux-x64 node-v10.16.2 i am working on ruby is this okay?Seaweed
Yeah, I think you did it :)Lutetium
but it shouldnt it say ruby instead okay of node? will this still function accurately since i am working in ruby environment? thanks for your help!Seaweed
No. The Node.js referred to in that message is the version used to build the Heroku CLI Itself. It has nothing to do with the language to use in your app.Curkell
@ChanranKim That worked for me finally without toolbelt from cli. Thanks a lot!Unbeaten
T
5

you are placing the flag "--classic" on the wrong side.

Try this:

$ sudo snap install --classic heroku

Then check the version using:

$ heroku --version
Tees answered 7/11, 2021 at 12:36 Comment(0)
T
4

To install heroku on ubuntu

sudo wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

To confirm Horuku is installed, and setup it with your credentials

heroku apps

Tamica answered 19/3, 2021 at 10:22 Comment(1)
This is the only answer that made it work on WSL2Denys
M
3

You can simply install using npm:

npm install -g heroku
Monied answered 21/6, 2022 at 9:23 Comment(0)
T
0

Installation instructions can change over time so my recommendation is always consult the official documentation, especially for a security sensitive app like this one.

Note that you probably want to install their Standalone Installation that will auto update to latest version which will ensure you keep up to date with security patches.

Taintless answered 29/9, 2022 at 23:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.