You can also read it as git installation linux edition.
The current state (2020/04/20) Amazon Linux Git latest Ver. Git-2.14.6-1.62.amzn1. ~~ (It looks like no good ~~
** As pointed out by @ SSW-SCIENTIFIC, a security patch has been applied to git-2.14.6-1.62
of linuxyum
above **, and in terms of this vulnerability, Git compilation Insco updates ** not required **.
Think of this article as a notebook on a board outside the exam range when you were a student.
We apologize for the delay in updating the postscript due to fever. (Fortunately it wasn't Corona)
** Addendum: **
As of today (April 21, 2020) _, the latest Git has changed from 2.26.1 → 2.26.2
, so I modified the command.
** After that, please check the latest version and rewrite the numbers **
--For Windows, please use from here git.exe
PowerShell
git update-git-for-windows #One shot
--Isn't it okay to use Homebrew
on Mac (appropriate)?
brew update && brew upgrade git
--By the way (if you have it), you also need to update Xcode
.
SourceTree
, please change to use Git of the updated system.First, check the status of Git
$ git --version
git version 2.14.5
Yes. Let's upload the latest (2.26.2) and below obediently. (Although there is no need to distribute patches for low Ver ...)
#Lower
yum update #You don't have to
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker
#Insco git dependencies, otherwise I would cry later(Past completed)
git --version #It seems that old Git can be inserted at the time of inscoring the dependency
git version 2.14.5 # `yum remove git`You can delete it, but ignore it.
#download
wget https://www.kernel.org/pub/software/scm/git/git-2.26.2.tar.gz
#here(https://mirrors.edge.kernel.org/pub/software/scm/git/)Find the latest from and drop
tar -zxf git-2.26.2.tar.gz #Deploy a lot
cd git-2.26.2 #The usual
#Production
make configure
./configure --prefix=/usr #Compile Compile
sudo make all
sudo make install # (_´Д`)No~~Otsukare
#Verification
$ git --version
git version 2.26.2
$ sudo make all
SUBDIR git-gui #← This
MSGFMT po/pt_pt.msg make[1]: *** [po/pt_pt.msg] Error 127
make: *** [all] Error 2
$ sudo make install
SUBDIR git-gui
MSGFMT po/pt_pt.msg make[1]: *** [po/pt_pt.msg] Error 127 #← This
__ If you do not enter the dependency relationship __ first, such an error will occur frequently. amen
--If you don't do the second dependency, you'll end up getting stuck, so unfortunately those who installed from packages such as yum are erratic
#Clone the latest repository with the git command
git clone git://git.kernel.org/pub/scm/git/git.git
#Pull to get the latest source and compile again
cd git
git pull
sudo make all && sudo make prefix=/usr/local install #As you can see, the command abbreviation
#final confirmation
git --version
** Added an easy way by professor @ github0013 @ github! (Thanks!) ** Please check the comments for more details.
sudo add-apt-repository ppa:git-core/ppa
# >PPA is launchpad.A personal repository on the net(← Quote description).. Because it's an individual! Be careful when using it in other cases.
sudo apt update
sudo apt install git #The latest version is always available on ppa by git official, so you can get the latest version with this.
git --version
git version 2.26.2
--Personal memo;
sudo apt-get install software-properties-common
ppa: git-core / ppa
What?PPA
, but " Official apt apt app "→" Prepare yourself "" Personal lipo provided by high-ranking developers. is.The following is ** no longer needed for Ubuntu Git **, but I will leave it for studying such as source → compile
#Moderately updated
sudo apt update
apt list --upgradable
sudo apt upgrade
#Lower
sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
#Dependent commuter pass
sudo apt autoremove #← In the case of apt, a magic command that cleans tools that are no longer needed
#Daun Road, with yum from here
wget https://www.kernel.org/pub/software/scm/git/git-2.26.2.tar.gz
tar -zxf git-2.26.2.tar.gz
cd git-2.26.2
#Production
make configure
./configure --prefix=/usr
sudo make all
sudo make install
Even though my Win terminal ended without any trouble, I searched for a site to death with the Update of ʻUbuntu and ʻAWS
, and it took me about a stupid time ...
You can see how you usually rely on rpm
and yum
package management (´ ・ ω:;.: ...)
I've actually written it so far, but I don't usually use it, so I think I'll forget it next week. And it seems foolish to wander around the sea on the net again and eat time, so I made it for myself!
After that, I think I'll dig into Evernote and copy and paste again every time I update or build a new one.
** If there is a mistake in the meaning of the comment comment, please let me know! ** **
Recommended Posts