I'm trying to install heroku on a virtual machine running CentOS. When I use

curl https://cli-assets.heroku.com/install.sh | sh I get an error message saying that my path does not include /usr/local/bin. However, when I do echo $PATH I can see /usr/local/bin.

$ echo $PATH


What should I do to fix this?

1 Answer 1


That script requires root to install. That means that when the script is running, it will be using root's environment and not yours. Root probably doesn't have /usr/local/bin in the path.

I am giving you the likely quick fix. This fix assumes that you have root permissions.. otherwise, you couldn't run this script in the first place.

The following suggestion will quite possibly make some *nix people crazy (because of sudo -i).

Open a terminal:

sudo -i                             #-- this logs you in as root.
export PATH=$PATH:/usr/local/bin    #-- temporarily add the path you need
<run your script>
exit                                #-- DONT run anything else as root!

Good luck..


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.