In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to compile and upgrade Git in Centos". In daily operation, I believe many people have doubts about how to compile and upgrade Git in Centos. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to compile and upgrade Git by yourself in Centos". Next, please follow the editor to study!
I installed CentOS-7-x86_64-1908 with a git of 1.8.3.1. Enter the following command under the terminal to view:
Git-version
If you have already installed another version of git and installed it in the default path through the installation package, it is best to uninstall the old version of git first, otherwise after installing the new version of git, cross calls will occur when calling git. If the old version is compiled and installed and the installation path is specified, there is no need to uninstall, but be sure to configure the environment variables after installing the new version of git.
1. Uninstall the old version of git
At the terminal, enter:
Yum remove git
2. Install dependent software
At the terminal, enter:
Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidocyum install gcc perl-ExtUtils-MakeMaker
You may not need to install dependencies to make through, my environment installed the first
3. Download the latest Git source code
Open the URL https://github.com/git/git/releases, where you can view all the released versions of git, copy the source code download address you want to download, and enter it at the terminal:
Cd / usr/local/src/
Wget https://github.com/git/git/archive/v2.24.1.tar.gz
4. Compile and install the latest version of git
At the terminal, enter:
Tar-vxf git-2.24.1.tar.gzcd git-2.24.1make prefix=/usr/local/git allmake prefix=/usr/local/git install
5. Add environment variables
At the terminal, enter:
Echo "export PATH=$PATH:/usr/local/git/bin" > > / etc/profilesource / etc/profile
6. Verify the version
At the terminal, enter:
Git-version
7. If your git accesses the https link, it will report an error: SSL connect error. Update nss
At the terminal, enter:
At this point in yum update nss, the study on "how to compile and upgrade Git in Centos" is over. I hope you can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.