yum 安装失败并出现奇怪的输出

yum 安装失败并出现奇怪的输出

我正在使用以下命令在运行 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

答案就在“奇怪的输出”中。首先,它说,“这里有未完成的事务。您可以考虑先运行 yum-complete-transaction 来完成它们。”

然后你就有一堆依赖问题了。它说:“你可以尝试使用 --skip-broken 来解决这个问题”。

我看到的有趣的事情是,您拥有比所需的更多最新的依赖项......

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

相关内容