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?

1 Answer 1

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .