Add an image source to CentOS

Source: Internet
Author: User

Add an image source to CentOS

If you want to install gdb on a lab server, you cannot find the source. After adding other sources, you can directly install it.

/Etc/yum. repos. there are some existing sources under the d folder, but many installation packages still cannot be found in these sources, so I added a sohu source according to other online tutorials, and finally succeeded.

Download other faster yum sources
Yum source of HKUST:
Wgethttp: // centos.ustc.edu.cn/CentOS-Base.repo

163 yum Source:
Wgethttp: // mirrors.163.com/.help/CentOS-Base-163.repo

Sohu yum Source
Wgethttp: // mirrors.sohu.com/help/CentOS-Base-sohu.repo

I only successfully added the sohu yum source to these sources, and then updated it to make the operation take effect.
Yum makecache

However, this command still fails to run, and the solution is to comment out the corresponding file in the addons item in the CentOS-Base-sohu.repo, which should be that the source under this option does not exist.
# [Addons]
# Name = CentOS-$ releasever-Addons-163.com
# Items list = http://mirrorlist.centos.org /? Release = & releasever & arch = $ basearch & repo = addons
# Baseurl = http://mirrors.163.com/centos/ Releasever/addons/ Basearch/
# Gpgcheck = 1
# Pgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Finally, run the command yum makecache to update it. Then you can use yum install gdb to install it.

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.