ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [Errno 14] Could not open/read file

[Errno 14] Could not open/read file

原创 Linux操作系统 作者:宋祖强 时间:2016-11-08 18:01:43 0 删除 编辑
# yum install ssh
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
file://media/repodata/repomd.xml: [Errno 14] Could not open/read file://media/repodata/repomd.xml
Trying other mirror.
Setting up Install Process
No package ssh available.
Error: Nothing to do


如上所示,在配置yum,并尝试安装软件时,系统会出现上面14号错误,原因是没有找到相关文件导致。具体yum配置如下:


[rhel-source-local]
name=Red Hat Enterprise Linux local
#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
baseurl=file://mnt/media/
enabled=1
gpgcheck=1
gpgkey=file://media/RPM-GPG-KEY-redhat-release


在这里,所范的错误是将file://mnt/media/少写了一个/,因为file://本身有两个/,再加上linux 系统 的根/,所以应该是file:///mnt/media/,将此处改正后yum正常。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29289867/viewspace-2128030/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-13

  • 博文量
    176
  • 访问量
    317498