【发布时间】:2017-04-23 08:42:18
【问题描述】:
从Compiler error - msgfmt command not found when compiling git on a shared hosting继续
在设法制作和安装最新的 git 后,如何强制 cpanel 共享主机使用我的版本?
我的版本在
/home/<ME>/git/git-2.9.0下-
我用
编译了make脚本make -i prefix=/home/<ME>/bin all echo $PATH;在变量中列出该路径。此外,路径附加到当前 PATH。
现在,我希望服务器响应
/home/<ME>/bin/git
当我运行which git
【问题讨论】:
-
运行
echo $PATH并告诉我们它说了什么。 -
@JohnZwinck - 就像我说的,路径似乎已经附加好了---回显路径变量的输出是
home/<me>/perl5/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/cpanel/composer/bin:/opt/puppetlabs/bin:/opt/dell/srvadmin/bin:/home/<me>/bin -
PATH 查找是递归的吗? - 主机是否在任何/所有嵌套子目录中查找二进制文件?
-
它不是递归的。但更重要的是,您将首选路径放在了 END 位置,而它应该位于 $PATH 变量的 START 位置。就目前而言,您的系统只会在您的目录中查找作为最后的手段,毕竟它可能会找到
git的所有其他目录。
标签: linux git github cpanel shared-hosting