Install Git with yum under CentOS

Source: Internet
Author: User
Tags nameserver

Originally Yum is normal:

Yum Install git

This can be done, but has been an error, it is probably meant to try to connect a few URLs, the connection failed, so you want to manually download the installation package method,


So first:

Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-extutils-makemaker

And then again:

wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz

The result was an error, not even the mainframe.


Just a little confused, suddenly feel that the problem of DNS is not connected to these domain host (in fact, Ping the qq.com, but ping IP can pass)

So I went to look at the current DNS:

Cat/etc/resolv.conf

That's what we found.

NameServer 8.8.4.4


So vi/etc/resolv.conf, added the following

NameServer 8.8.8.8

NameServer 119.6.6.6

NameServer 61.139.2.69


The first 8.8.8.8 and 8.8.4.4 are Google's.

The following two are Chengdu Unicom and telecommunications


Add and then yum install git, fix it.


PS: Complete DNS, no restart required

Install Git with yum under CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.