Loading mirror speeds from cached hostfile долго

Обновлено: 07.07.2024

После установки CentOS 7.4 c диска (скачан с офф. сайта) возникла необходимость установки дополнительных пакетов. Т.к. интернета на машине нет - необходимо создать локальный репозиторий (в качестве репозитория выступает скачанный диск).

Выполнил следующие действия:

1) В каталоге /etc/yum.repos.d создал файл cdrom.repo с содержимым:

2) подмонтировал диск mount /dev/sr0 /mnt/cdrom

(диск подмонтирован корректно каталог repodata на нем присутствует. Так же в каталоге /mnt/cdrom подмонтировано содержимое диска

3) очистил yum конфигурацию

Загружены модули: fastestmirror, langpacks Сброс источников:Repos base extras updates Cleaning up everything Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos Cleaning up list of fastest mirrors

4) Просмотрел репозитории

Loading mirror speeds from cached hostfile

Идентификатор репозитория репозиторий состояние Repos myrepo 0 base/7/x86_64 CentOS-7 - Base 0 extras/7/x86_64 CentOS-7 - Extras 0 updates/7/x86_64 CentOS-7 - Updates 0 repolist: 0

5) попробовал установить пакет и вываливается ошибка

Загружены модули: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> .

4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage:

yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid>

5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise:

yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

6) попробовал выполнить команду но она сразу же выдает help по команде

Загружены модули: fastestmirror, langpacks

Необходимо задать команду

Usage: yum [options] COMMAND

List of Commands:

check Проверка проблем в базе данных RPM

check-update Проверка доступных обновлений пакетов

clean Удаление кэшированных данных

deplist Отображение зависимостей пакета

distribution-synchronization Обновить установленные пакеты до новейших доступных версий

downgrade откат к предыдущей версии пакета

В чем может быть причина ошибок? Я так подозреваю что не прописал корректно новый repo файл

During the try to install yum-utils, I ran into the problem that there seems to be no enabled repos. How can I enable yum-config-manager , when I seem to need him to do so.

19 1 1 gold badge 1 1 silver badge 3 3 bronze badges

18 Answers 18

Then edit /etc/yum.repos.d/CentOS-Base.repo

Comment out mirrorlist and uncomment baseurl

And enjoy your yum update. ;)

2,496 1 1 gold badge 28 28 silver badges 30 30 bronze badges works great! same comment about using actual OS version (5.10 in my case) instead of $releaseserver

I think another reason for this error message is if your release is no longer supported. None of the suggestions in this thread worked for me, and my internet connectivity was fine, but then I realized that I'm running Centos 5 (I know, ancient. ) which reached its end-of-life on 2017 Mar 31 - right around when the yum repo error started showing up.

for centos 5.4, you can change /etc/yum.repos.d/CentOS-Base.repo into like this.


403 1 1 gold badge 5 5 silver badges 9 9 bronze badges

Centos 6 version met its EOL last month (November 30, 2020)

Thanks, Centos 6.10, in /etc/yum.repos.d/CentOS-Base.repo, replace all the repo URL using mirror.nsc.liu.se/centos-store/6.10/[repo-name], it worked well, life saver :)

Установил Centos 6.3 в среде OpenVZ. Имеется проблема с установками пакетов:

Опыта с Centos очень мало, больше работал с Ubuntu. Прошу помочь!


Попробуй
yum search 'midnight commander'

toney ★★★★★ ( 03.10.12 15:18:46 )
Последнее исправление: toney 03.10.12 15:19:02 (всего исправлений: 1)


Подключи другие репы.

пожалуйста, подскажи как

Подключишь доп. репу epel. Но вообще, mc должен быть в стандартном репозитарии ИМХО.

mc есть в стандартном репозитории

No package mc available. Error: Nothing to do




ничего не изменилось


хочу дополнить, что не ставится ни один пакет, не только mc.



Ну тогда должно работать. Ещё, может, место в /var кончилось, а так всё нормально, т.е. непонятно. Если пока ограничться mc, то:

Сам не могу разобраться. Установил Centos из шаблонов openVZ, возникла эта проблема. Поставил Ubuntu - все отлично.


Ну не знаю. Может, ещё шаманство с


я бы поглядел CentOS-Base.repo

и убрал бы куда-то всё из /etc/yum.repos.d кроме CentOS-Base.repo


Осталось tcpdump'ом посмотреть, что за ерунда происходит.


Сделай как я написал. Если не поможет, вернешь как было.

ничего не изменилось, пробовал

Ради интереса, проделал все с нуля. Удалил контейнер и шаблон в openvz, с которого ставил. Скачал шаблон centos-6-86x с openvz заново. Установил. Запустил. Задал корректный часовой пояс и проверил дату. Проверил пинг. Но ситуация не изменилась! Затем поставил centos-5-86x. В ней нет такой проблемы.

Дело в шаблоне? Нужна именно 6 версия.


1 Answer 1

To install specific package from specific repo you can use

Say there can be conflict between version, consider example of installing mariadb 5.5.66 , in my case I got 2 repo mariadb-5 and mariadb-10 , suppose if I wish to install from mariadb-5 repo then I use

I have set up a centOS 6.5 server using VMWare Workstation 9 on a Windows 8.1 host laptop. When trying to use yum to install packages I get the following error:

The VM works on other machines ( Windows 7 desktop and an Windows 8.1 laptop), just not the one I need it to work on. I am able to ping the host from the guest and the guest from the host, so there is a connection to the internet.

I have uninstalled and reinstalled Workstation 9. Ungraded to workstation 10. Rebuilt the CentOS 6.5 server. Nothing seems to solve the issue.

When I upgraded from Windows 8 to Windows 8.1, I had VMWare installed. I found out later that I should have uninstalled VMWare before upgrading. Could this have messed up my VMWare network adapters?

Anyone have any ideas?

4,100 2 2 gold badges 33 33 silver badges 45 45 bronze badges 401 1 1 gold badge 4 4 silver badges 3 3 bronze badges

Читайте также: