Linux is trying to mirror other

Linux is trying to mirror other


 

Scenarios occur:

In windows7 system, the virtual machine on Oracle VM VirtualBox, CentOS7 use,

In use with yum, has been reminding "is trying other mirror."


 

Solution:

Online to find ways, most of them are said to remind that mistake, because Suman, you need to configure yum source, it changed the country,

(1) backup of the original image file:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

(2) download mirror 163 or the cloud Ali

centos7 mirroring 163 (if your system is centos6, address CentOS7 changed CentOS6)

wget -cO /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo

Ali cloud or use a mirror (if your system is centos6, address Centos7 changed Centos6)

wget -cO /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

(3) generate new mirrored cache

yum clean all
yum makecache

Extended:

  If the speed is very slow, or prompt "is trying to mirror other" try to change the network settings to try:

  If the virtual machine configuration is a static address, you can try to a dynamic address,

1, is set to obtain a dynamic address, BOOTPROTO cd / etc / sysconfig / network-scripts, the ifcfg-enp0s ... this file is modified DHCP = static.

2, the virtual machine settings in the [Network], set to the network address translation [NAT].

Executed again

yum clean all

yum makecache

Look fix the problem.

=================================================================================

About wget parameters:

  -c HTTP

  -O downloaded to the specified location

  -o log message written to the specified file

================================================================

 

Guess you like

Origin www.cnblogs.com/gyfluck/p/11242099.html