我之前使用ubuntu apt-get安装了git.最近卸载了它并从源代码安装了git以获得1.8.4版本.
但是现在每当我在Ubuntu上打开一个新的termial时,我都会收到以下错误:
-bash: /usr/lib/git-core/git-sh-prompt: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我试图搜索各种bash启动文件,如.bashrc,.bash_profile或.profile,但找不到任何基于git的设置的引用.
如何删除此错误.我没有/ usr/lib/git_core文件夹,但是有/ usr/libexec/git-core文件夹.
小智 8
清除git包解决了这个问题:
sudo apt-get purge git
Run Code Online (Sandbox Code Playgroud)
得到:
$ 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 ...
Run Code Online (Sandbox Code Playgroud)
目录 /etc/bash_completion.d 中有一个文件git*
尝试访问/usr/lib/git-core/git-sh-prompt
,可能来自以前的安装。
尝试删除git*
然后从源重新安装
rm -rf /etc/bash_completion.d/git
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2865 次 |
最近记录: |