In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the YUM replacement source yum can not find the installation package how to do, the article is very detailed, has a certain reference value, interested friends must read it!
Among the CentOS VM provided by the company, there is only one build.repo under / etc/yum.repos.d, and the yum sources provided are only a few sources within the company, and many packages cannot be found in these sources. So to add other sources, the following post describes how to add yum feeds of China University of Science and Technology, Sohu and 163to CentOS.
The update method is as follows:
Enter the Yum source configuration directory first
Cd / etc/yum.repos.d
Backup the yum source that comes with the system
Mv CentOS-Base.repo CentOS-Base.repo.save
Download other faster yum sources
The yum source of China University of Science and Technology:
Wget http://centos.ustc.edu.cn/CentOS-Base.repo
163s yum source:
Wget http://mirrors.163.com/.help/CentOS-Base-163.repo
Yum source for sohu
Wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
After updating the yum source, it is recommended to update it so that the operation will take effect immediately
Yum makecache
[yasi]:
An error was encountered while performing the last step, yum makecache:
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* addons: mirrors.163.com
* base: mirror.metrocast.net
* extras: mirror.beyondhosting.net
* fasttrack: centos.vipernetworksystems.com
* updates: centos.vipernetworksystems.com
Http://mirrors.163.com/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22-"The requested URL returned error: 404"
Trying other mirror.
Http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22-"The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
The reason is that http://mirrors.163.com/centos/6/addons/x86_64/repodata/repomd.xml and http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml really don't exist and may have been updated. The solution is to find an available URL to replace it, or comment out the entire item in the corresponding .repo file. I use the latter here.
For example, in CentOS-Base-163.repo, comment out the entire addon entry
# [addons]
# name=CentOS-$releasever-Addons-163.com
# mirrorlist= 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
Comment out the following in CentOS-Base-sohu.repo
# [addons]
# name=CentOS-$releasever-Addons-sohu.com
# mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
# baseurl= http://mirrors.sohu.com/centos/$releasever/addons/$basearch/
# gpgcheck=1
# gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5CentOS-Base-sohu.repo
Then, execute the yum makecache. After that, yum can find the package I want to install, such as gdb, subversion, gcc-c++, etc.
Note:
Sometimes you can't find a package with yum list xxx, so you can try yum search xxx.
For example, yum list vim reports Error: No matching Packages to list. Yum search vim returns:
Vim-X11.x86_64: The VIM version of the vi editor for the X Window System
Vim-common.x86_64: The common files needed by any version of the VIM editor
Vim-enhanced.x86_64: A version of the VIM editor which includes recent enhancements
Vim-minimal.x86_64: A minimal version of the VIM editor
The above is all the contents of the article "what to do if the YUM replacement source yum cannot find the installation package". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.