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
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.
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 .
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.
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.
I solved this problem by doing the following:
$ wget https://toolbelt.heroku.com/install.sh
$ sudo sh install.sh
Hope it helps.
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:
sudo sh
to say sudo /bin/bash
/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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With