我之前使用 ubuntu apt-get 安装了 git。 最近卸载了它并从源代码安装了 git 以获得版本 1.8.4 。
但是现在每当我在 Ubuntu 上打开一个新的终端时,我都会收到以下错误:
-bash: /usr/lib/git-core/git-sh-prompt: No such file or directory
我尝试搜索各种 bash 启动文件,例如 .bashrc 、.bash_profile 或 .profile,但找不到对任何基于 git 的设置的引用。
如何消除这个错误。我没有/usr/lib/git_core 文件夹,但有/usr/libexec/git-core 文件夹。
最佳答案
清除 git 包解决了问题:
sudo apt-get purge git
给予:
$ sudo apt-get purge git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
git*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
(Reading database ... 103069 files and directories currently installed.)
Removing git ...
Purging configuration files for git ...
关于git - 在 Ubuntu 上从源代码安装 git 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18451980/