简体   繁体   中英

Once I compile and install chosen version of git, how do I force the shared hosting to use my version?

Continuing from Compiler error - msgfmt command not found when compiling git on a shared hosting

How do I, after managing to make and install the latest git, force the cpanel shared host to use my version?

  • My version is under /home/<ME>/git/git-2.9.0

  • I compiled the make script with

     make -i prefix=/home/<ME>/bin all 
  • echo $PATH; lists that path in the variable. Also, the path is appended to the current PATH.

Now, I want the server to respond with

/home/<ME>/bin/git

when I run which git

SO,Post Installation, the binaries were stored in

/home/<ME>/bin/bin/

because, I compiled with

make -i prefix=/home/<ME>/bin all

Issue

PATH lookups are not recursive.

SOLUTION

  • Optionally, Move all git binaries into a sub directory under /home/<me>/bin/

  • Just add all subdirectories of /home/<ME>/bin/

to the current PATH. inside .~/.bash_profile

and do

source ~/.bash_profile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM