В моем CentOS-Base.repo есть следующие зеркала:
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
#released updates
[updates]
name=CentOS Server updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
baseurl=http://custom-url/centOS-updates/
enabled=1
Когда я говорю yum install yum-utils
, он выходит из строя с сообщением об ошибке
http://custom-url/centOS-updates/Packages/yum-utils-1.1.31-46.el7_5.noarch.rpm: [Errno 14] HTTP Error 500 - Internal Server Error
Trying other mirror.
Error downloading packages:
yum-utils-1.1.31-46.el7_5.noarch: [Errno 256] No more mirrors to try.
У меня есть два вопроса:
Why is it looking at the `updates` repo instead of base. `yum info yum-utils` has the repo field set to `updates`. When I disable the `updates` repo in the repo file and do a `yum info yum-utils` it shows the repo field as `base` correctly. What decides the repo to look at given a package?
Why is 'Package' appended to the baseUrl when it tries to find yum-utils in the updates repo? This is causing a `500 Internal Server Error` as the path with Packages appended to it is invalid
Stack Overflow - это сайт для вопросов по программированию и разработке. Этот вопрос кажется не по теме, потому что он не о программировании или разработке. См. О каких темах я могу спросить здесь в Справочном центре. Возможно, лучше спросить Суперпользователь или Обмен стеков Unix и Linux.
Если я сталкиваюсь с этой проблемой во время запуска марионетки, которая пытается их установить, это не проблема разработки? Но я перенесу это на упомянутые сайты.
@iamauser, ты был прав. Очистил репо и попробовал еще раз. оно работает. Спасибо. Если хочешь, добавь как ответ, приму
Первая помощь internal server error
из Yum
, скорее всего, заключается в повреждении repodata
на удаленном сервере и / или несоответствии cache
между клиентом и сервером.
Чтобы очистить кеш-память, используйте
$ yum --enablerepo=* clean all
или просто так, если по умолчанию включены все репозитории:
$ yum clean all
Это делает всю очистку, доступную в yum
. Вот что они делают:
CLEAN OPTIONS
The following are the ways which you can invoke yum in clean mode. Note that "all files" in the commands below means "all files in currently enabled reposito‐
ries". If you want to also clean any (temporarily) disabled repositories you need to use --enablerepo='*' option.
yum clean expire-cache
Eliminate the local data saying when the metadata and mirrorlists were downloaded for each repo. This means yum will revalidate the cache for each repo.
next time it is used. However if the cache is still valid, nothing significant was deleted.
yum clean packages
Eliminate any cached packages from the system. Note that packages are not automatically deleted after they are downloaded.
yum clean headers
Eliminate all of the header files, which old versions of yum used for dependency resolution.
yum clean metadata
Eliminate all of the files which yum uses to determine the remote availability of packages. Using this option will force yum to download all the metadata
the next time it is run.
yum clean dbcache
Eliminate the sqlite cache used for faster access to metadata. Using this option will force yum to download the sqlite metadata the next time it is run,
or recreate the sqlite metadata if using an older repo.
yum clean rpmdb
Eliminate any cached data from the local rpmdb.
yum clean plugins
Tell any enabled plugins to eliminate their cached data.
yum clean all
Does all of the above.
Это подходит для меня. Спасибо!
Похоже, что
repodata
в вашем репо и / илиyum metadata
не очищены. Попробуйтеyum --enablerepo=* clean all
, а затем повторите попытку.