centos yum error

При установке или обновлении пакетов в Centos вылезли ошибки:
1.

yum update
#Loaded plugins: fastestmirror
#Determining fastest mirrors
#Could not retrieve mirrorlist //mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
#14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
#Error: Cannot find a valid baseurl for repo: base

Пинг тоже не идет:

ping -c3 google.com
#ping: unknown host google.com

2.

yum repolist
#Loaded plugins: fastestmirror
#Determining fastest mirrors
#Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

Ошибка 1 — это проблема неправильной настройки серверов имен.
Идем в /etc/resolv.conf и первыми 2мя строками прописываем нс-ы гугла:

nameserver 8.8.8.8
nameserver 8.8.4.4
...

Проверяем:

ping -c3 mirrorlist.centos.org
#PING mirrorlist.centos.org (88.150.173.218) 56(84) bytes of data.
#64 bytes from h88-150-173-218.host.redstation.co.uk (88.150.173.218): icmp_seq=1 ttl=56 time=4.32 ms
#64 bytes from h88-150-173-218.host.redstation.co.uk (88.150.173.218): icmp_seq=2 ttl=56 time=4.26 ms
#64 bytes from h88-150-173-218.host.redstation.co.uk (88.150.173.218): icmp_seq=3 ttl=56 time=4.27 ms
#
#--- mirrorlist.centos.org ping statistics ---
#3 packets transmitted, 3 received, 0% packet loss, time 2014ms
#rtt min/avg/max/mdev = 4.264/4.288/4.329/0.029 ms
ping -c3 google.com
#PING google.com (216.58.209.238) 56(84) bytes of data.
#64 bytes from lhr08s05-in-f238.1e100.net (216.58.209.238): icmp_seq=1 ttl=58 time=0.719 ms
#64 bytes from lhr08s05-in-f238.1e100.net (216.58.209.238): icmp_seq=2 ttl=58 time=0.708 ms
#64 bytes from lhr08s05-in-f238.1e100.net (216.58.209.238): icmp_seq=3 ttl=58 time=0.727 ms
#
#--- google.com ping statistics ---
#3 packets transmitted, 3 received, 0% packet loss, time 2007ms
#rtt min/avg/max/mdev = 0.708/0.718/0.727/0.007 ms

Ошибка 2 — устаревший адрес репозитория.
Фикс простой. Открываем в редакторе /etc/yum.repos.d/epel.repo и меняем:

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

на

mirrorlist=//mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

Проверяем:

yum repolist
#Loaded plugins: fastestmirror, refresh-packagekit
#Loading mirror speeds from cached hostfile
# * base: repo.bigstepcloud.com
# * epel: www.mirrorservice.org
# * extras: centos.openitc.uk
# * rpmforge: www.mirrorservice.org
# * updates: mirrors.coreix.net
#repo id           repo name                                             status
#base              CentOS-6 - Base                                          6,518
#epel              Extra Packages for Enterprise Linux 6 - x86_64        11,744+1
#extras            CentOS-6 - Extras                                           38
#rpmforge          RHEL 6 - RPMforge.net - dag                            4,709+9
#updates           CentOS-6 - Updates                                       1,370
#vz-base           vz-base                                                      3
#vz-updates        vz-updates                                                   8
#repolist: 24,390

Скажите свое мнение

ваш email не публикуется. обязательно *

;-) :yawn: :whew: :toivo: :tmi: :time: :thinking: :talking: :sweating: :swear: :sun: :star: :smoke: :smirk: :sleepy: :skype: :shock: :shake: :rofl: :rain: :punch: :puke: :poolparty: :pizza: :phone: :party: :oops: :nod: :no: :ninja: :neutral: :nerd: :music: :muscle: :mrgreen: :movie: :mooning: :mmm: :middlefinger: :makeup: :mail: :mad: :lol: :lipssealed: :kiss: :itwashtme: :inlove: :idea: :hi: :heidy: :heart: :headbang: :happy: :handshake: :giggle: :fubar: :flower: :evilgrin: :emo: :dull: :drunk: :drink: :doh: :devil: :dance: :cry: :cool: :coffie: :clapping: :cash: :call: :cake: :bug: :brokenheart: :bow: :blush: :beer: :bear: :bandit: :arrow: :angry: :angel: :^) :???: :?: :-| :-o :-P :-D :-) :-( :!:

 

*

code

Этот сайт использует Akismet для борьбы со спамом. Узнайте как обрабатываются ваши данные комментариев.