Error in git install from source on Ubuntu

I had git previously installed using the ubuntu apt-get utility. Recently uninstalled it and installed git from the source to get version 1.8.4.

However, now when I open a new termial on Ubuntu, I get the following error:

-bash: /usr/lib/git-core/git-sh-prompt: No such file or directory 

I tried to find various bash startup files such as .bashrc, .bash_profile or .profile, but cannot find a link to any git installation.

How to remove this error. I do not have the / usr / lib / git _core folder, but you have / usr / libexec / git -core.

+6
source share
3 answers

There is a git* file in the / etc / bash _completion.d directory that tried to access /usr/lib/git-core/git-sh-prompt , possibly from a previous installation.

Try removing git* and then reinstalling it from the source again

 rm -rf /etc/bash_completion.d/git 
+3
source

Cleaning up git packages solves the problem:

 sudo apt-get purge git 

gives:

 $ 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 ... 
+8
source
 Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726669 Ubuntu: https://bugs.launchpad.net/ubuntu/+source/git/+bug/1196510 Mint: forums.linuxmint.com/viewtopic.php?f=47&t=135218 

You should be able to comment on "./usr/lib/ git -core / git -sh-prompt" from / etc / bash_completion.d / git-try or do what Debian Jessie has and check if the file exists.

The following - / etc / bash _completion.d / git - pops up completely from Jesse:

 # In git versions < 1.7.12, this shell library was part of the # git completion script. # # Some users rely on the __git_ps1 function becoming available # when bash-completion is loaded. Continue to load this library # at bash-completion startup for now, to ease the transition to a # world order where the prompt function is requested separately. # if [[ -e /usr/lib/git-core/git-sh-prompt ]]; then . /usr/lib/git-core/git-sh-prompt fi 
+2
source

Source: https://habr.com/ru/post/952534/


All Articles