VestaCP,  Linux

Sửa lỗi failure: repodata/repomd.xml from C7.4.1708-base: [Errno 256] No more mirrors to try khi cài VestaCp trên CentOS 7

Thỉnh thoảng cài VestaCP trên CentOS 7 lại dính lỗi này, nay note lại để dành 😀

failure: repodata/repomd.xml from C7.4.1708-base: [Errno 256] No more mirrors to try. http://vault.centos.org/7.4.1708

Would you like to continue [y/n]: y
Installation backup directory: /root/vst_install_backups/1526197390

Installation will take about 15 minutes ...

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 5.1 kB 00:00:00
* base: mirrors.cn99.com
* epel: mirrors.tongji.edu.cn
* extras: mirrors.163.com
* remi: mirrors.tuna.tsinghua.edu.cn
* remi-php55: mirrors.tuna.tsinghua.edu.cn
* remi-php56: mirrors.tuna.tsinghua.edu.cn
* remi-test: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.cn99.com
base | 3.6 kB 00:00:00
nginx | 2.9 kB 00:00:00
remi | 2.9 kB 00:00:00
remi-debuginfo | 2.9 kB 00:00:00
remi-php55 | 2.9 kB 00:00:00
remi-php55-debuginfo | 2.9 kB 00:00:02
remi-php56 | 2.9 kB 00:00:00
remi-php56-debuginfo | 2.9 kB 00:00:00
remi-test | 2.9 kB 00:00:00
remi-test-debuginfo | 2.9 kB 00:00:00
updates | 3.4 kB 00:00:00
vesta | 2.9 kB 00:00:00
(1/10): remi-php55/primary_db | 225 kB 00:00:00
(2/10): remi-php56/primary_db | 231 kB 00:00:00
(3/10): remi/primary_db | 2.0 MB 00:00:00
(4/10): remi-test/primary_db | 581 kB 00:00:00
(5/10): nginx/x86_64/primary_db | 34 kB 00:00:01
(6/10): vesta/x86_64/primary_db | 64 kB 00:00:01
(7/10): remi-php56-debuginfo/x86_64/primary_db | 53 kB 00:00:02
(8/10): remi-php55-debuginfo/x86_64/primary_db | 53 kB 00:00:11
(9/10): remi-test-debuginfo/x86_64/primary_db | 113 kB 00:00:19
(10/10): remi-debuginfo/x86_64/primary_db | 388 kB 00:00:35
Resolving Dependencies
--> Running transaction check
---> Package remi-release.noarch 0:7.0-1.el7.remi will be updated
---> Package remi-release.noarch 0:7.4-2.el7.remi will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Updating:
remi-release noarch 7.4-2.el7.remi remi 14 k

Transaction Summary
=============================================================================================================================================================================================
Upgrade 1 Package

Total download size: 14 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/remi/packages/remi-release-7.4-2.el7.remi.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Public key for remi-release-7.4-2.el7.remi.noarch.rpm is not installed
remi-release-7.4-2.el7.remi.noarch.rpm | 14 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
Userid : "Remi Collet <RPMS@FamilleCollet.com>"
Fingerprint: 1ee0 4cce 88a4 ae4a a29a 5df5 004e 6f47 00f9 7f56
Package : remi-release-7.0-1.el7.remi.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Updating : remi-release-7.4-2.el7.remi.noarch 1/2
warning: /etc/yum.repos.d/remi.repo created as /etc/yum.repos.d/remi.repo.rpmnew
Cleanup : remi-release-7.0-1.el7.remi.noarch 2/2
Verifying : remi-release-7.4-2.el7.remi.noarch 1/2
Verifying : remi-release-7.0-1.el7.remi.noarch 2/2

Updated:
remi-release.noarch 0:7.4-2.el7.remi

Complete!
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* epel: mirrors.tongji.edu.cn
* extras: mirrors.163.com
* remi: mirrors.tuna.tsinghua.edu.cn
* remi-php55: mirrors.tuna.tsinghua.edu.cn
* remi-php56: mirrors.tuna.tsinghua.edu.cn
* remi-safe: mirrors.tuna.tsinghua.edu.cn
* remi-test: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.cn99.com
remi-safe | 2.9 kB 00:00:00
remi-safe/primary_db | 1.2 MB 00:00:00
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
Retrieving http://c.vestacp.com/rhel/7/remi-release.rpm
Preparing... ################################# [100%]
Updating / installing...
1:remi-release-7.0-1.el7.remi warning: /etc/yum.repos.d/remi.repo created as /etc/yum.repos.d/remi.repo.rpmnew
################################# [ 50%]
Cleaning up / removing...
2:remi-release-7.4-2.el7.remi ################################# [100%]
--2018-05-13 15:44:27-- http://c.vestacp.com/rhel/7/GPG.txt
Resolving c.vestacp.com (c.vestacp.com)... 104.236.66.100
Connecting to c.vestacp.com (c.vestacp.com)|104.236.66.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1686 (1.6K) [text/plain]
Saving to: ‘/etc/pki/rpm-gpg/RPM-GPG-KEY-VESTA’

100%[===================================================================================================================================================>] 1,686 --.-K/s in 0s

2018-05-13 15:44:28 (150 MB/s) - ‘/etc/pki/rpm-gpg/RPM-GPG-KEY-VESTA’ saved [1686/1686]

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* epel: mirrors.tongji.edu.cn
* remi: mirrors.tuna.tsinghua.edu.cn
* remi-php55: mirrors.tuna.tsinghua.edu.cn
* remi-php56: mirrors.tuna.tsinghua.edu.cn
* remi-test: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.cn99.com
C7.0.1406-base | 3.6 kB 00:00:00
C7.0.1406-updates | 2.9 kB 00:00:00
C7.1.1503-base | 3.6 kB 00:00:00
C7.1.1503-updates | 3.4 kB 00:00:00
C7.2.1511-base | 3.6 kB 00:00:00
C7.2.1511-updates | 3.4 kB 00:00:00
C7.3.1611-base | 3.6 kB 00:00:00
C7.3.1611-updates | 3.4 kB 00:00:00
http://vault.centos.org/7.4.1708/os/x86 ... repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



One of the configured repositories failed (CentOS-7.4.1708 - Base),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

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=C7.4.1708-base ...

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 C7.4.1708-base
or
subscription-manager repos --disable=C7.4.1708-base

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=C7.4.1708-base.skip_if_unavailable=true

failure: repodata/repomd.xml from C7.4.1708-base: [Errno 256] No more mirrors to try.
http://vault.centos.org/7.4.1708/os/x86 ... repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Error: yum install failed
[root@mywebserver ~]#

Cách sửa lỗi này đơn giản nhất là mở file /etc/yum.repos.d/CentOS-Vault.repo tìm đến từ khóa C7.4.1708-base sau đó thêm hai dòng sau vào bên dưới 

skip_if_unavailable=1
keepcache=0

Sau khi chỉnh sửa thì nhìn như nhau:

[C7.4.1708-updates]
name=CentOS-7.4.1708 - Updates
baseurl=http://vault.centos.org/7.4.1708/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
skip_if_unavailable=1
keepcache=0
enabled=0

Chạy lệnh yum update nữa là xong 😀

 

Tui là jamesblackvn!

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.