Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install Heroku toolbelt in Ubuntu AWS instance

Tags:

heroku

The following error is thrown while trying to install the Heroku toolbelt in the default Ubuntu AWS 12.04 AMI based instance

ubuntu@ip-11-121-123-115:~$ wget -qO- https://toolbelt.heroku.com/install.sh | sh

This script requires superuser access to install software. You will be prompted for your password by sudo.

 sh: 7: [[: not found
 sh: 29: [[: not found
 Installation complete
like image 310
Rpj Avatar asked Apr 08 '13 07:04

Rpj


People also ask

What is heroku toolbelt?

The Heroku Toolbelt is a package of the Heroku CLI, Foreman, and Git — all the tools you need to get started using Heroku at the command line. The Toolbelt is available as a native installer for OS X, Windows, and Debian/Ubuntu Linux. The Toolbelt has been available since last fall as part of our polyglot platform.

Where to run heroku CLI?

Get Started with the Heroku CLI After you install the CLI, run the heroku login command. Enter any key to go to your web browser to complete login. The CLI then logs you in automatically. If you'd prefer to stay in the CLI to enter your credentials, run heroku login -i .

How do I deploy a heroku terminal?

To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.

How do I know if heroku is installed?

Open Command Prompt by right-clicking the Start Menu, choose Run, enter cmd and click OK. Now type heroku and press enter. If you receive a help message, heroku-cli was installed successfully.


2 Answers

I solved this problem by doing the following:

$ wget https://toolbelt.heroku.com/install.sh
$ sudo sh install.sh

Hope it helps.

like image 134
sagunms Avatar answered Oct 23 '22 21:10

sagunms


I think your sh is not a symlink to bash. Try

wget ...blah... | /bin/bash

and see if that helps.

--EDIT--

Ha! Would you believe it! Not 5 minutes after answering, I had the same problem. Here's the fix:

  1. Download the install.sh file
  2. Modify the line that says sudo sh to say sudo /bin/bash
  3. Run it with /bin/bash install.sh

The cause is that on some Ubuntu's, /bin/sh is actually a link to /bin/dash (not bash). And the install script uses some bash-isms without actually checking to see if you're using bash or not.

like image 22
dty Avatar answered Oct 23 '22 21:10

dty