Centsパッケージマネージャyumに関連

7627 ワード

RPMストレージ
↗︎ https://vault.centos.org/
↗︎ http://ftp.iij.ad.jp/pub/linux/centos-vault/
↗︎ https://www.rpmfind.net/linux/rpm2html/search.php
↗︎ http://rpm.pbone.net/
↗︎ https://www.rpmseek.com/
Cents OSの現在のバージョンを確認
cat /etc/redhat-release
Trouble Shooting
  • Another app is currently holding the yum lock解決する
  •     rm -rf /var/run/yum.pid
  • YumRepo Error: All mirror URLs are not using ftp, http[s] or file.の原因となる

  • CentOSバージョンの正式なサポートを終了すると、Fastmirror Siteはそのバージョンのパッケージを削除し、エラーが発生します.
    解決する

  • デフォルト・リポジトリ・ファイルの確認
  •         vim /etc/yum.repos.d/CentOS-Base.repo 
    - mirrorlist에 주석처리, **baseurl을 아래와 같이 수정**
        - `$releasever`이 정확하게 안 나오면 직접 입력 (예 : 6은 인식안됨 → 6.10으로 수정)
            [base]
            name=CentOS-$releasever – Base
            #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
            baseurl=http://vault.centos.org/$releasever/os/$basearch/
            gpgcheck=1
            gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
            #released updates
            [updates]
            name=CentOS-$releasever – Updates
            #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
            baseurl=http://vault.centos.org/$releasever/updates/$basearch/
            gpgcheck=1
            gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
            #additional packages that may be useful
            [extras]
            name=CentOS-$releasever – Extras
            #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
            baseurl=http://vault.centos.org/$releasever/extras/$basearch/
            gpgcheck=1
            gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
            #additional packages that extend functionality of existing packages
            [centosplus]
            name=CentOS-$releasever – Plus
            #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
            baseurl=http://vault.centos.org/$releasever/centosplus/$basearch/
            gpgcheck=1
            enabled=0
            gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
            #contrib – packages by Centos Users
            [contrib]
            name=CentOS-$releasever – Contrib
            #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
            baseurl=http://vault.centos.org/$releasever/contrib/$basearch/
            gpgcheck=1
            enabled=0
            gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    - 레포지토리 클린 및 갱신
            yum clean all
            yum repolist
  • Timeout Error解決する
  • /etc/yum.confファイルのタイムアウト設定の追加または変更
  •     * 혹시 설치 과정에 timeout이 발생하면 yum의 timeout 설정을 수정해 보자.
          아래와 같이 /etc/yum.conf 파일에 timeout 설정을 추가 또는 수정 한다.
        [main]
        keepcache=0
        debuglevel=2
        timeout=60