2017-02-09 2 views
0

Ich versuche, ein Paket auf CentOS zu installieren, aber es löst einen Fehler aus, wenn ich den Befehl "yum" ausführe. Die Internetverbindung funktioniert gut. Ich versuche alles sauber zu machen, aber das Problem bleibt bestehen.centos yum schlägt fehl, irgendetwas zu installieren oder System zu aktualisieren

Fehler:

[[email protected] ~]# yum install ntp 

Loaded plugins: fastestmirror 


    One of the configured repositories failed (Unknown), 
    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=<repoid> ... 

     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 <repoid> 
      or 
       subscription-manager repos --disable=<repoid> 

     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=<repoid>.skip_if_unavailable=true 

    Cannot find a valid baseurl for repo: base/$releasever/x86_64 

Mein yum repolist der nächste ist:

[[email protected] ~]# yum repolist list 
Loaded plugins: fastestmirror 
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden 
Trying other mirror. 
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/solutions/69319 

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/ 

repolist: 0 

Wenn ich die repolist Liste:

[[email protected] ~]# yum repolist 
Loaded plugins: fastestmirror 
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden 
Trying other mirror. 
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/solutions/69319 

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/ 

repo id        repo name        status 
base/$releasever/x86_64    CentOS-$releasever - Base    0 
dockerrepo/$releasever    Docker Repository      0 
extras/$releasever/x86_64   CentOS-$releasever - Extras   0 
updates/$releasever/x86_64   CentOS-$releasever - Updates   0 
repolist: 0 
+0

Listen Sie Repos mit dem Befehl 'yum repolist' und veröffentlichen Sie die Ausgabe, die Sie versuchten, 'yum repolist list', aber es sieht aus, als ob etwas mit dem Docker Repository falsch ist –

+0

Danke! Ich füge die Ausgabe der Beschreibung hinzu. Kannst du überprüfen? @MichalHainc –

+0

Zeigt dieser Befehl einige Informationen? cat /etc/yum.repos.d/docker.repo –

Antwort

1

BEVOR DIESES TRYING, ein Backup IHRE MASCHINE, SIE KÖNNTEN IHR OS MEHR/KOMPLETT BESCHÄDIGEN

Es scheint, dass Ihre yum-Variable $ releasever irgendwie korrupt ist, es wird in der Regel durch fehlende Centos-Release-Paket auf der Maschine aus irgendwelchen obskuren Gründen verursacht.

Sie können überprüfen, ob Sie das Paket durch:

rpm -qi centos-release 

Sie werden wahrscheinlich sehen:

"package centos-release is not installed" 

zuerst die genaue CentOS-Version herausfinden, dass Sie durch die Ausführung als root haben:

cat /etc/redhat-release 

Sie werden etwas wie das sehen:

CentOS Linux release 7.3.1611 (Core) 

Sie können die CentOS-Release-Paket aus Repo durch holen: Jetzt CentOS-Release-Paket über rpm installieren laufen

wget http://vault.centos.org/centos/7.3.1611/updates/x86_64/Packages/centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm 

:

sudo rpm -Uvh --replacepkgs centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm 

Als nächstes können Sie versuchen, etwas zu installieren mit yum und du könntest erhalten:

[[email protected] ikerlan]# sudo yum install wget 
    error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch 
    error: cannot open Packages index using db5 - (-30969) 
    error: cannot open Packages database in /var/lib/rpm 
    CRITICAL:yum.main: 

    Error: rpmdb open failed 

Jetzt können Sie versuchen, th neu zu starten e Maschine oder versuchen Sie den folgenden Befehl verwenden, um die Umdrehungen pro Minute db neu zu erstellen:

rpm --rebuilddb 
0

ich in dieses Problem lief bei dem Versuch, MariaDB auf CentOS zu installieren 7. Ich war sehr frustriert und nach viel gefunden an dieser link die Antwort suchen .

Hier ist, was dieses Problem für mich behoben. Als root ausführen

# yum --disablerepo "*" --enablerepo epel install [package] 
# yum clean all 

„EPEL“ kann alles sein, was Repo Sie mögen, aber dieses war für mich. Platzieren Sie [Paket] wie beschrieben in den Befehl, nicht das Paket, das Sie installieren möchten.

Nachdem Sie das oben genannte ausgeführt haben, beenden Sie root und führen Sie die Installation aus, die Sie vor dem Auftreten des Fehlers versucht haben.

Verwandte Themen