0

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

/usr/local/bin:/local/home/sysadmin/.rbenv/plugins/ruby-build/bin:/local/home/sysadmin/.rbenv/shims:/local/home/sysadmin/.rbenv/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/local/home/sysadmin/.local/bin:/local/home/sysadmin/bin


What should I do to fix this?

0

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..

  • Thank you! It worked! – Zex13 Mar 28 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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