linux - 编译并安装选定版本的 git 后,如何强制共享主机使用我的版本?

标签 linux git github cpanel shared-hosting

继续 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

最佳答案

所以,安装后,二进制文件存储在

/home/<ME>/bin/bin/

因为,我用

编译

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

问题

PATH 查找不是递归的。

解决方案

  • 可选,将所有 git 二进制文件移动到 /home/<me>/bin/ 下的子目录中

  • 只需添加/home/<ME>/bin/的所有子目录即可

到当前路径。里面.~/.bash_profile

source ~/.bash_profile

关于linux - 编译并安装选定版本的 git 后,如何强制共享主机使用我的版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43569075/

相关文章:

linux - 我如何告诉 `gar` 或 `ar` 输出 `elf32-i386` 输出?

linux - 如何使用 shell 脚本对新文件中的第 3 列进行排序,并更改新文件中第 2 列的相应值?

git - 我怎样才能让 git push 要求确认或运行一些检查?

Git "Fetch URL"和 "Push URL",有什么区别?

javascript - RPivotTable 能够列出超过允许的数量

c++ - 移植到 AIX 6.1 (ld : 0711-317 ERROR: Undefined symbol) with Xerces

linux - 通过 SSH 在后台运行远程命令

git - 我可以/如何配置 git 扩展以在 Windows 资源管理器中显示哪些目录已被触及?

GitHub 上的 README.md 中未显示图像

git - 在git中 merge 两个远程分支