2013-08-26 9 views
6

Ich hatte git zuvor mit ubuntu apt-get installiert installiert. Vor kurzem deinstalliert es und installiert Git aus der Quelle, um Version 1.8.4 zu erhalten.Fehler in Git Installation von der Quelle auf Ubuntu

aber jetzt, wenn ich ein neues Terminal ausgeben auf Ubuntu öffnen, bekomme ich folgende Fehlermeldung:

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

habe ich versucht, verschiedene bash starten Dateien wie Bashrc zu suchen, Bash_profile oder .profile, kann aber‘ Es gibt keinen Hinweis auf irgendeine git-basierte Konfiguration.

Wie kann ich diesen Fehler entfernen. Ich habe keinen/usr/lib/git_core-Ordner, aber habe/usr/libexec/git-core-Ordner.

+0

ist die '/ usr/libexec/git-core' ein Überbleibsel aus der dpkg Installation oder hat es sich von Ihrem Quellen- erstellt installation? wenn letzteres, warum hast du git nicht in '/ usr/local' installiert? –

Antwort

3

Es gibt eine Datei git* im Verzeichnis /etc/bash_completion.d, die versucht hat, auf /usr/lib/git-core/git-sh-prompt zuzugreifen, vielleicht von der vorherigen Installation.

Versuchen Sie, git* zu löschen und dann wieder von der Quelle neu installieren

rm -rf /etc/bash_completion.d/git 
+0

Ja, das ist da, danke. Kann ich nicht einfach diese Datei entfernen, ohne von der Quelle neu zu installieren, wie ich bereits installiert habe Kann ich einfach nur 'make install' ausführen. – jethar

8

die git Pakete Bereinigen löst das Problem:

sudo apt-get purge git 

Gibt:

$ 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 ... 
2
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 

Sie sho Kann nicht kommentieren "./usr/lib/git-core/git-sh-prompt "aus /etc/bash_completion.d/git-prompt oder tun, was Debian Jessie getan hat und prüfen, ob die Datei existiert oder nicht.

Die folgenden die /etc/bash_completion.d/git-prompt ist von Jessie in seiner Gesamtheit:

# 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 
Verwandte Themen