LinuxForum.Fans
Тема

Сломался yum

Автор: Velland 80 сообщений 22612 просмотров
#271495
Hrafn написал:
а в целом доступ в инет с этой машины нормальный?

Да нормальный.

Hrafn написал:
покажите еще содержимое /etc/yum.conf
и вывод
text
yum repolist

yum.conf

text

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

# This is the default, if you make this bigger yum won't see if the metadata # is newer on the remote and so you'll "gain" the bandwidth of not having to # download the new metadata and "pay" for it by yum not having correct # information. # It is esp. important, to have correct metadata, for distributions like # Fedora which don't keep old packages around. If you don't like this checking # interupting your command line usage, it's much better to have something # manually check the metadata once an hour (yum-updatesd will do this). # metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d

yum repolist

text

[root@www ~]# yum repolist
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
repo id         repo name                                                 status
CentALT         CentALT Packages for Enterprise Linux 6 - x86_64          0
Webmin          Webmin Distribution Neutral                               0
base            CentOS-6 - Base                                           0
epel            Extra Packages for Enterprise Linux 6 - x86_64            0
extras          CentOS-6 - Extras                                         0
updates         CentOS-6 - Updates                                        0
repolist: 0
#271503

и заодно содержимое /var/cache/yum/x86_64/6/base/mirrorlist.txt

#271504
AlfaStriker написал:
Я конечно не такой прям Линуксоид, но дам совет.
Сделай так:
1. Проверь есть ли Интернет
# ping google.ru

2. Удали все лишние репы
# yum remove centalt-release -y
# yum remove epel-testing-release -y
# yum remove epel-release -y
# yum remove webmin-release -y

3. Попробуй обновится
# yum clean -y
# yum update -y




По моему надо удалить все не рабочие репы.

ping google.ru

text

[root@www ~]# ping google.ru
PING google.ru (173.194.35.191) 56(84) bytes of data.
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=1 ttl=54 time=62.6 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=2 ttl=54 time=67.5 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=3 ttl=54 time=61.5 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=4 ttl=54 time=61.4 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=5 ttl=54 time=61.1 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=6 ttl=54 time=61.4 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=7 ttl=54 time=61.4 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=8 ttl=54 time=61.6 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=9 ttl=54 time=61.4 ms
64 bytes from muc03s02-in-f31.1e100.net (173.194.35.191): icmp_seq=10 ttl=54 time=62.8 ms

yum remove centalt-release -y

text

[root@www ~]# yum remove centalt-release -y
Loaded plugins: fastestmirror, priorities
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package centalt-release.noarch 0:6-1 will be erased
--> Finished Dependency Resolution

CentALT | 5.9 kB 00:00 ... http://centos.alt.ru/repository/centos/6/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for CentALT: Damaged repomd.xml file Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: CentALT. Please verify its path and try again You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

yum remove epel-testing-release -y

text

[root@www ~]# yum remove  epel-testing-release -y
Loaded plugins: fastestmirror, priorities
Setting up Remove Process
No Match for argument: epel-testing-release
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

yum remove epel-release -y

text

]0;root@www:~[root@www ~]# um remove epel-release -y[1@y
Loaded plugins: fastestmirror, priorities
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-7 will be erased
--> Finished Dependency Resolution

CentALT | 5.9 kB 00:00 ... http://centos.alt.ru/repository/centos/6/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for CentALT: Damaged repomd.xml file Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: CentALT. Please verify its path and try again You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

yum remove webmin-release -y

text

[root@www ~]# yum remove webmin-release -y
Loaded plugins: fastestmirror, priorities
Setting up Remove Process
No Match for argument: webmin-release
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

yum clean -y

text

[root@www ~]# yum clean -y
Loaded plugins: fastestmirror, priorities
Error: clean requires an option: headers, packages, metadata, dbcache, plugins, expire-cache, rpmdb, all

yum update -y

text

[root@www ~]# yum update -y
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
#271505
Hrafn написал:
и заодно содержимое /var/cache/yum/x86_64/6/base/mirrorlist.txt

По этому пути его вобще нету.

#271506

Может как вариант:

text
# yum clean all
# yum clean dbcache
# yum clean metadata
#271507

первая команда и так все вычистит

#271509

что вообще есть в /var/cache/yum/x86_64/6/base/ ?

#271511

попробуйте еще:

text
cd /tmp
wget http://mirror.yandex.ru/centos/6.3/os/x86_64/repodata/repomd.xml
#271512
Hrafn написал:
что вообще есть в /var/cache/yum/x86_64/6/base/ ?

Папка packages и она пуста

#271514

сделайте

text
yum update

и снова посмотрите. что там есть

#271515
Hrafn написал:
попробуйте еще:
text
cd /tmp
wget http://mirror.yandex.ru/centos/6.3/os/x86_64/repodata/repomd.xml

text

[root@www tmp]# wget http://mirror.yandex.ru/centos/6.3/os/x86_64/repodata/repom 
d.xml
--2012-08-23 14:18:32--  http://mirror.yandex.ru/centos/6.3/os/x86_64/repodata/repomd.xml
Распознаётся mirror.yandex.ru... 213.180.204.183, 2a02:6b8:0:201::1
Устанавливается соединение с mirror.yandex.ru|213.180.204.183|:80... соединение установлено.
Запрос HTTP послан, ожидается ответ... 200 OK
Длина: нет информации [text/html]
Saving to: «repomd.xml»

[<=> ] 0 --.-K/s [ <=> ] 6 000 --.-K/s в 0,04s

2012-08-23 14:18:32 (148 KB/s) - «repomd.xml» saved [6000]

#271518
Hrafn написал:
сделайте
text
yum update

и снова посмотрите. что там есть

yum update

text

[root@www tmp]# yum update
Loaded plugins: fastestmirror, priorities
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

Ничего не изменилось, все таже папка и все.

#271519

хм, уже интересней
как вариант, если с Яндекса тянет нормально, попробуйте в Centos-Base.repo прописать в baseurl прямую ссылку на яндексовое зеркало

#271521

и на всякий случай список зеркал из файла /var/cache/yum/x86_64/6/base/mirrorlist.txt


http://mirror.netcologne.de/centos/6.3/os/x86_64/
http://ftp.halifax.rwth-aachen.de/centos/6.3/os/x86_64/
http://ftp.plusline.de/centos/6.3/os/x86_64/
http://mirror.atrpms.net/centos/6.3/os/x86_64/
http://centos.copahost.com/6.3/os/x86_64/
http://centos.vieth-server.de/6.3/os/x86_64/
http://ftp.hosteurope.de/mirror/centos.org/6.3/os/x86_64/
http://wftp.tu-chemnitz.de/pub/linux/centos/6.3/os/x86_64/
http://centos.intergenia.de/6.3/os/x86_64/
[url]ftp://mirror.fraunhofer.de/centos.org/6.3/os/x86_64/[/url]
http://ftp.uni-bayreuth.de/linux/CentOS/6.3/os/x86_64/
http://mirror.silyus.net/centos/6.3/os/x86_64/
http://centos.bio.lmu.de/6.3/os/x86_64/
http://mirror.de.leaseweb.net/centos/6.3/os/x86_64/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/centos/6.3/os/x86_64/
http://mirror.softaculous.com/centos/6.3/os/x86_64/
http://centos.mirror.connexeon.net/6.3/os/x86_64/
http://centos.mirror.integer.be/6.3/os/x86_64/
http://centos.cu.be/6.3/os/x86_64/
http://centos.weepeetelecom.be/6.3/os/x86_64/

#271525

Может ему просто дать рабочие репо файлы?
Что-то намудрилось.

#271527

попробовать можно конечно, но может и не помочь, поскольку я никак понять не могу, где именно затык

#271529
Hrafn написал:
хм, уже интересней
как вариант, если с Яндекса тянет нормально, попробуйте в Centos-Base.repo прописать в baseurl прямую ссылку на яндексовое зеркало

Прописал

text

Loaded plugins: fastestmirror, priorities
Determining fastest mirrors
Error: Cannot find a valid baseurl for repo: extras
#271530

по идее, если я правильно понимаю, то при запуске yum генерится список зеркал, по которым потом и обращается
а тут такое ощущение. что ошибка какая-то в конфиге. то ли буква не та, то или еще что

#271531

Такое ощущение что кто-то редактировал основные репо файлы.
И теперь хоть пушкой стреляй, ни чего не помогает.

Должно быть 4-ре основных (системных) репуса:
1. CentOS-Base.repo
2. CentOS-Debuginfo.repo
3. CentOS-Media.repo
4. CentOS-Vault.repo

Вот ссылка на эти файлы, они в архиве:
http://rghost.net/39954353


Ихнее содержимое:
1. CentOS-Base.repo

text
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

2. CentOS-Debuginfo.repo

text
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#

# All debug packages from all the various CentOS-5 releases # are merged into a single repo, split by BaseArch # # Note: packages in the debuginfo repo are currently not signed #

[debug] name=CentOS-6 - Debuginfo baseurl=http://debuginfo.centos.org/6/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6 enabled=0

3. CentOS-Media.repo

text
# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
#  CentOS-6.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c6-media [command]
#  
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c6-media [command]
 
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
        file:///media/cdrom/
        file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

4. CentOS-Vault.repo

text

#-----------------

[C6.0-base] name=CentOS-6.0 - Base baseurl=http://vault.centos.org/6.0/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.0-updates] name=CentOS-6.0 - Updates baseurl=http://vault.centos.org/6.0/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.0-extras] name=CentOS-6.0 - Extras baseurl=http://vault.centos.org/6.0/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.0-contrib] name=CentOS-6.0 - Contrib baseurl=http://vault.centos.org/6.0/contrib/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.0-centosplus] name=CentOS-6.0 - CentOSPlus baseurl=http://vault.centos.org/6.0/centosplus/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0 #-----------------

[C6.1-base] name=CentOS-6.1 - Base baseurl=http://vault.centos.org/6.1/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.1-updates] name=CentOS-6.1 - Updates baseurl=http://vault.centos.org/6.1/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.1-extras] name=CentOS-6.1 - Extras baseurl=http://vault.centos.org/6.1/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.1-contrib] name=CentOS-6.1 - Contrib baseurl=http://vault.centos.org/6.1/contrib/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.1-centosplus] name=CentOS-6.1 - CentOSPlus baseurl=http://vault.centos.org/6.1/centosplus/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0 #-----------------

[C6.2-base] name=CentOS-6.2 - Base baseurl=http://vault.centos.org/6.2/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.2-updates] name=CentOS-6.2 - Updates baseurl=http://vault.centos.org/6.2/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.2-extras] name=CentOS-6.2 - Extras baseurl=http://vault.centos.org/6.2/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.2-contrib] name=CentOS-6.2 - Contrib baseurl=http://vault.centos.org/6.2/contrib/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

[C6.2-centosplus] name=CentOS-6.2 - CentOSPlus baseurl=http://vault.centos.org/6.2/centosplus/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=0

#271532
"Velland" написал:
Прописал

уже лучше :)
сделайте то де самое для extras
только убедитесь, что строка прописана корректно

Войдите или зарегистрируйтесь, чтобы ответить.