(028) 730.99.168 - (024) 730.99.168
AoHoaViet khuyen mai coupon

YumRepo Error: All mirror URLs are not using ftp, http[s] or file

YumRepo Error: All mirror URLs are not using ftp, http[s] or file

Gần đây Centos 6 đã kết chính thức kết thúc vòng đời sẽ không còn được hổ trợ từ Centos (CentOS Product Specifications) , Vì vậy, tất cả các repo trước đó không được chấp nhận.

Do đó, bạn có thể gặp lỗi sau khi chạy lệnh yum trên máy chủ CentOS 6 của mình.

Để khắc phục vấn đề này bạn chỉnh sửa /etc/yum.repos.d/CentOS-Base.repo và thay thế tất cả mirrorlist​​​​​​ , chắc cú phải sao lưu lại repo hiện tại

1. Vào thư mục /etc/yum.repos.d/ :

# cd /etc/yum.repos.d/

# cp CentOS-Base.repo CentOS-Base.repo.old

2. Chỉnh sửa tệp /etc/yum.repos.d/CentOS-Base.repo

# vi CentOS-Base.repo

3. Thay thế mirrorlist 's,  xóa hết các phần sau :

[base]
[updates]
[extras]

4. Cập nhật lai:

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/6.10/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&infra=$infra
baseurl=http://vault.centos.org/6.10/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&infra=$infra
baseurl=http://vault.centos.org/6.10/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&infra=$infra
baseurl=http://vault.centos.org/6.10/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&infra=$infra
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

5. Clean yum cache:

# yum clean all
# yum update

THE END.,
Team AoHoaViet

 

Tags:

Bài viết liên quan