19

I downloaded Heroku from Heroku toolbelt using

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

in the terminal, which they recommended on their site. My Ubuntu (14.04.1) didn't recognize the -q0-, so I took it out. It then seemed to download fine - I see the in the directory I was in when i downloaded it.

Now, however, it still doesn't recognize heroku as a command. It also won't show me where it is with the 'whereis' command. But when I look in the current directory with ls -a, it shows up. It seems to be there.

How do I install it?

karel
  • 110,292
  • 102
  • 269
  • 299
JohnB42
  • 191
  • 1
  • 1
  • 4
  • it looks like heroku toolbelt is on apt: https://stackoverflow.com/q/15203840/262852 ??? Or not? I don't see it...no ppa. – Thufir Oct 26 '17 at 13:40

3 Answers3

26

Just tried this now on 14.04. Here is how I did it, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

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

Once it finished installing, I typed heroku apps. see image below for more info.

enter image description here

Mitch
  • 106,657
  • 24
  • 210
  • 268
  • 1
    You might receive the following warning: "WARNING: The following packages cannot be authenticated! heroku heroku-toolbelt " . Then just run "apt-get install -y --force-yes heroku-toolbelt" – bogdan.rusu Nov 27 '16 at 12:14
11

You can install Heroku on Ubuntu 14.04 or any later version as a snap:

sudo snap install --classic heroku

This is published directly by Heroku. It updates automatically whenever they release a new version.

The more adventurous can install from the edge channel and get updates for every upstream commit:

sudo snap install --classic --edge heroku
muru
  • 193,181
  • 53
  • 473
  • 722
Evan
  • 4,988
  • 1
  • 23
  • 19
3

Configuring Heroku is quite straight-forward on DigitalOcean. After ssh-ing, run the following commands with sudo:

wget https://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli-linux-x64.tar.gz -O heroku.tar.gz
tar -xvzf heroku.tar.gz
sudo mkdir -p /usr/local/lib /usr/local/bin

List the content of the current directory with ls. I found this output:

heroku-cli-v6.15.22-3f1c4bd-linux-x64  
heroku.tar.gz

This output determines the value in the next step, use the first file name in the next command:

sudo mv heroku-cli-v6.15.22-3f1c4bd-linux-x64 /usr/local/lib/heroku
sudo ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku

And that's it.

muru
  • 193,181
  • 53
  • 473
  • 722
Zameer Ansari
  • 197
  • 1
  • 2
  • 12