git - 在 Ubuntu 上从源代码安装 git 时出错

标签 git bash ubuntu

我之前使用 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/

相关文章:

git - 如何进行多人GIT分支 merge

c++ - 如何使用 Eclipse CDT 构建 C++ 项目?

regex - 使用 sed 仅获取行号 "grep -in"

c# - XmlPreloadedResolver 上的 Mono TypeLoadException

git - Hadoop 代码 - Git 和 SVN

regex - awk/sed 在两个模式之间插入行

linux - (标准输入) 1 : syntax error when bc within if

linux - Apache2 只能通过 sudo 启动

node.js - 下载 node.js v16 的问题

git - 代理 key RSA SHA256 : . .. 返回不正确的签名类型