S'il vous plaît quelqu'un peut me dire ce qui ne va pas avec cela?
Je cours
$ Sudo apt-get purge git; Sudo apt-get autoremove; Sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
git-man liberror-Perl
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
git* git-core*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 21.0 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 81533 files and directories currently installed.)
Removing git-core (1:1.9.1-1ubuntu0.1) ...
Removing git (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Purging configuration files for git (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
git-man liberror-Perl
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 1,831 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 80929 files and directories currently installed.)
Removing git-man (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Removing liberror-Perl (0.17-1.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
git-man liberror-Perl
Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-Arch git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
git git-man liberror-Perl
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/11.0 MB of archives.
After this operation, 22.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package liberror-Perl.
(Reading database ... 80751 files and directories currently installed.)
Preparing to unpack .../liberror-Perl_0.17-1.1_all.deb ...
Unpacking liberror-Perl (0.17-1.1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../git-man_1%3a2.2.2-0ppa1~ubuntu10.04.1_all.deb ...
Unpacking git-man (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Selecting previously unselected package git.
Preparing to unpack .../git_1%3a2.2.2-0ppa1~ubuntu10.04.1_i386.deb ...
Unpacking git (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up liberror-Perl (0.17-1.1) ...
Setting up git-man (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Setting up git (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Après cela, $ git --version
affiche:
git version 1.8.2.1
On dirait que git 2.x a été installé mais je peux continuer à obtenir l'ancienne version.
Mises à jour:
J'ai déjà essayé ceci: Mise à jour Git 1.7.9.5 vers la version actuelle de GIT 2.x sur Ubuntu 12.04
dpkg -L git
see: https://Gist.github.com/montogeek/e7bedaf03cef9a3d969b
which git
:/usr/local/bin/git
Vous devez ajouter le référentiel Git Maintainers pour obtenir la dernière version de Git.
Veuillez exécuter ces commandes dans l'ordre:
Sudo add-apt-repository ppa:git-core/ppa
Sudo apt-get update
Sudo apt-get install git
Ensuite, vérifiez la version du Git installé:
git --version
Il n'est pas toujours nécessaire de supprimer le Git existant avant de le mettre à niveau, mais si vous rencontrez des problèmes, procédez comme suit, puis répétez les étapes mentionnées ci-dessus:
Sudo apt-get remove git
Vous avez une deuxième copie de git installée dans /usr/local/bin
qui est utilisée à la place du git installé sur le système.
Sans savoir comment l'autre git a été installé, je dirais que vous devez supprimer manuellement l'autre binaire git de /usr/local/bin
.