centos yum源配置问题解决办法
2016-03-08 10:30
417 查看
问题:
[root@hadoop yum.repos.d]# mount -t auto /dev/cdrom /mnt/cdrom
mount: you must specify the filesystem type
解决办法:
mount -o loop /dev/cdrom /mnt/cdrom/
问题:
Could not open/read file:///mnt/cdrom/Packages/repodata/repomd.xml
有问题的本地yum源配置:
[root@hadoop yum.repos.d]# cat CentOS-Media.repo
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]
[local]
name=CentOS-local
baseurl=file:///mnt/cdrom/Packages
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
解决办法:
将上面红色的baseurl替换为:baseurl=file:///mnt/cdrom 解决上述问题
[root@hadoop yum.repos.d]# mount -t auto /dev/cdrom /mnt/cdrom
mount: you must specify the filesystem type
解决办法:
mount -o loop /dev/cdrom /mnt/cdrom/
问题:
Could not open/read file:///mnt/cdrom/Packages/repodata/repomd.xml
有问题的本地yum源配置:
[root@hadoop yum.repos.d]# cat CentOS-Media.repo
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]
[local]
name=CentOS-local
baseurl=file:///mnt/cdrom/Packages
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
解决办法:
将上面红色的baseurl替换为:baseurl=file:///mnt/cdrom 解决上述问题
相关文章推荐
- 汇编语言寻址方式(Linux)
- linux下PS1命令提示符设置 包含颜色设置
- centos yum的妙用--whatprovides
- 在linux下向U盘复制文件时发生错误,显示目标是只读的,windows下能够正常使用,应该怎么解决?
- linux中udev简单的用法
- linux下用/proc/stat文件来计算cpu的利用率
- centos7 install 安装mysql
- Linux基本的报警监控脚本
- 转载---Linux vim配置及alias命令
- Linux内核升级
- 进程间通信与线程间通信 . windows下多线程通信方法 Linux 多线程通信
- LINUX 中常见的压缩命令
- CentOS6下yum下载的包存放路径
- 新手学Linux(三)----使用 Vagrant 打造跨平台开发环境(二)
- linux命令 --SVN
- linux 打包成bin文件
- 常用Linux命令
- Linux的XServer
- centos网卡eth1变成eth0修改方法
- 2016:如何选择 Linux 桌面环境