Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Teddy Zugana
Teddy Zugana

Posted on • Edited on

fix CentOS 6 error: YumRepo

Resolution
To fix this problem you edit /etc/yum.repos.d/CentOS-Base.repo and replace all mirrorlist

  1. Go to /etc/yum.repos.d/ directory:

    cd /etc/yum.repos.d/

  2. Make copy of original file:

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

  3. Open and edit file with any text editor:

    vi CentOS-Base.repo

  4. Replace mirrorlist‘s

Replace sections:

[base]
[updates]
[extras]

With following:

[base]name=CentOS-$releasever - Base# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/baseurl=https://vault.centos.org/6.10/os/$basearch/gpgcheck=1gpgkey=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://mirror.centos.org/centos/$releasever/updates/$basearch/baseurl=https://vault.centos.org/6.10/updates/$basearch/gpgcheck=1gpgkey=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://mirror.centos.org/centos/$releasever/extras/$basearch/baseurl=https://vault.centos.org/6.10/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Enter fullscreen modeExit fullscreen mode
  1. Clean yum cache

    yum clean all

  2. Run again yum update command:

    yum update

Now you can successfully update your CentOS 6.

Top comments(1)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
jmx profile image
jurmatiX 🛴
  • Joined

Perfect. Thx.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

vi veri veniversum vivus vici Noob Teams
  • Location
    Indonesia Jakarta
  • Education
    Computer Science Sriwijaya University
  • Work
    Programmer at Icon Plus, Ezeelink Jakarta
  • Joined

More fromTeddy Zugana

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp