然而...

然而...

我正在尝试将 MySQL 安装到 Fedora 14 VM 上。当我尝试安装 MySQL 时收到以下消息:

Error Downloading Packages:
zlib-devel-1.2.5-2.fc14.x86_64: failure: Packages/zlib-devel-1.2.5-2.fc14.x86_64.rpm from class-DVD: [Errno 256] No more mirrors to try.
libxml2-devel-2.7.7-2.fc14.x86_64: failure: Packages/libxml2-devel-2.7.7-2.fc14.x86_64.rpm from class-DVD: [Errno 256] No more mirrors to try.

我尝试添加存储库并得到以下结果:

[root@dyan src]# yum install mysql mysql-server
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
file:///media/Fedora%2014%20x86_64%20DVD/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/Fedora%2014%20x86_64%20DVD/repodata/repomd.xml
Trying other mirror.
http://download.fedora.redhat.com/pub/fedora/linux/core///os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: download.fedora.redhat.com_pub_fedora_linux_core_os_. Please verify its path and try again

有人可以告诉我如何修改 yum.conf (或者将哪个适当的存储库添加到 yum.repos.d)以便我可以使用 yum 安装它吗?

答案1

哎呀。这是来自错误输出:

http://download.fedora.redhat.com/pub/fedora/linux/core///os/repodata/repomd.xml
                                                       ^^^

请注意,这些空元素对应于此处可能是的元素不明确的外壳变量:

yum-config-manager --add-repo \       
http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os‌​/
                                                        ^^^^^^^^^^^^^^^^^^^^^

我很确定$releasever应该是 just14$basearchi686x86_64所以应该是:

http://download.fedora.redhat.com/pub/fedora/linux/core/14/x86_64/os‌​/

假设您使用的是 64 位系统(否则使用i686该系统)。

然而...

整条路径可能不再有效;你可以尝试:

yum-config-manager --add-repo http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/14/‌​Fedora/x86_64/os/

但请参阅评论中的讨论。想必您还想删除之前添加的虚假存储库。

相关内容