yum install 失败并出现奇怪的输出

yum install 失败并出现奇怪的输出

我正在使用以下命令在运行 fedora 17 的笔记本电脑上安装 gcc。

yum install gcc

但我得到了奇怪的输出。

Loaded plugins: langpacks, presto, refresh-packagekit
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-                transaction first to finish them.
--> Running transaction check
---> Package gcc.x86_64 0:4.7.0-5.fc17 will be installed
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.7.0-5.fc17.x86_64
--> Running transaction check
---> Package glibc-devel.x86_64 0:2.15-37.fc17 will be installed
--> Processing Dependency: glibc-headers = 2.15-37.fc17 for package: glibc-devel-2.15-37.fc17.x86_64
--> Processing Dependency: glibc = 2.15-37.fc17 for package: glibc-devel-2.15-37.fc17.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.15-37.fc17.x86_64
--> Running transaction check
---> Package glibc-devel.x86_64 0:2.15-37.fc17 will be installed
--> Processing Dependency: glibc = 2.15-37.fc17 for package: glibc-devel-2.15-37.fc17.x86_64
---> Package glibc-headers.x86_64 0:2.15-37.fc17 will be installed
--> Processing Dependency: glibc = 2.15-37.fc17 for package: glibc-headers-2.15-37.fc17.x86_64
--> Finished Dependency Resolution
Error: Package: glibc-headers-2.15-37.fc17.x86_64 (fedora)
       Requires: glibc = 2.15-37.fc17
       Installed: glibc-2.15-56.fc17.i686 (@updates)
           glibc = 2.15-56.fc17
       Available: glibc-2.15-37.fc17.i686 (fedora)
           glibc = 2.15-37.fc17
Error: Package: glibc-devel-2.15-37.fc17.x86_64 (fedora)
       Requires: glibc = 2.15-37.fc17
       Installed: glibc-2.15-56.fc17.i686 (@updates)
           glibc = 2.15-56.fc17
       Available: glibc-2.15-37.fc17.i686 (fedora)
           glibc = 2.15-37.fc17
 You could try using --skip-broken to work around the problem
** Found 141 pre-existing rpmdb problem(s), 'yum check' output follows:
1:NetworkManager-0.9.4.0-9.git20120521.fc17.x86_64 is a duplicate with 1:NetworkManager-    0.9.4.0-7.git20120403.fc17.x86_64
1:NetworkManager-glib-0.9.4.0-9.git20120521.fc17.x86_64 is a duplicate with     1:NetworkManager-glib-0.9.4.0-7.git20120403.fc17.x86_64
PackageKit-0.7.5-1.fc17.x86_64 is a duplicate with PackageKit-0.7.4-3.fc17.x86_64
PackageKit-glib-0.7.5-1.fc17.x86_64 is a duplicate with PackageKit-glib-0.7.4-    3.fc17.x86_64
PackageKit-yum-0.7.5-1.fc17.x86_64 is a duplicate with PackageKit-yum-0.7.4-3.fc17.x86_64
abrt-2.0.10-4.fc17.x86_64 is a duplicate with abrt-2.0.10-3.fc17.x86_64
abrt-addon-ccpp-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-ccpp-2.0.10-3.fc17.x86_64
abrt-addon-kerneloops-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-kerneloops-2.0.10-3.fc17.x86_64
abrt-addon-python-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-python-2.0.10-3.fc17.x86_64
abrt-addon-vmcore-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-vmcore-2.0.10-3.fc17.x86_64................

目前我的/etc/yum.repos.d/文件夹只有一个文件fedora.repo

该文件的内容fedora.repo对我来说看起来没问题。我应该检查其他位置吗?

[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
    #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/    $basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-    $releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/    $basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-    $releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/    source/SRPMS/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-  $releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

答案1

由于无法理解的原因,您错过了更新存储库。添加它并重试。 :)

答案2

我要么删除 rpm rpm -e rpm,然后重新安装它们,要么使用 yum update --skip-broken 然后尝试另一个更新。看起来您的 rpmdb 可能有重复的条目,这些条目在规范文件中内置了先决条件,这给您带来了麻烦。

答案3

尝试删除 i686 架构中当前的 gcc rpm。命令rpm -e可以帮助您。我发现,由于安装了多个架构 rpm,因此发生了冲突。因此,在全新安装 gcc 时,请确保添加正确的体系结构以及包名称,例如:

yum install gcc.xx.xx._x86_64
or 
yum install gcc.xx.xx._i686

相关内容