1、先看了一篇文档:https://blog.csdn.net/wfdtxz/article/details/7368357
2、又看了一篇文档:https://www.cnblogs.com/ChinaHook/p/6083876.html
在通过两篇文档查看之后还是没有解决问题,之前出现得问题都是软件包冲突或者软件包错误等问题
最后发现是因为自己yum源配置得问题:
同事帮忙解决问题的过程
[root@localhost douer]# cat /etc/yum.repos.d/
bak/ epel.repo epel-testing.repo media.repo
[root@localhost douer]# cat /etc/yum.repos.d/media.repo
[test]
name=CentOS7
baseurl=file:///mnt
enabled=1
gpgcheck=1
gpgkey=file:///mnt/RPM-GPG-KEY-CentOS-7
[root@localhost douer]# ls /mnt/
mnt
[root@localhost douer]# cd /mnt/
[root@localhost mnt]# ls
mnt
[root@localhost mnt]# ll
total 0
-rw-r--r--. 1 root root 0 Jun 15 09:47 mnt
(reverse-i-search)`mount': ^Cunt /dev/cdrom /mnt/
[root@localhost mnt]# umount mnt ##把原来的mnt卸载
umount: mnt: not mounted
[root@localhost mnt]# cd
[root@localhost ~]# umount
anaconda-ks.cfg .bashrc .dbus/ .pki/ .xauthTEMFui
.bash_history .cache/ initial-setup-ks.cfg .tcshrc
.bash_logout .config/ original-ks.cfg .viminfo
.bash_profile .cshrc package/ .xauthHrUhpk
[root@localhost ~]# umount /mnt/
umount: /mnt/: not mounted
[root@localhost ~]# umount /mnt/mnt
umount: /mnt/mnt: not mounted
[root@localhost ~]# cd /mnt/
[root@localhost mnt]# ls
mnt
[root@localhost mnt]# cat mnt
[root@localhost mnt]# ll
total 0
-rw-r--r--. 1 root root 0 Jun 15 09:47 mnt
[root@localhost mnt]# rm -f mnt
[root@localhost mnt]# cd
[root@localhost ~]# mount
mount mount.fuse mount.nfs mountpoint
mount.cifs mount.glusterfs mount.nfs4 mountstats
[root@localhost ~]# mount
mount mount.fuse mount.nfs mountpoint
mount.cifs mount.glusterfs mount.nfs4 mountstats
[root@localhost ~]# mount /dev/sr0 /mnt/ ##重新进行挂载
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# ls /mnt/
CentOS_BuildTag EULA images LiveOS repodata RPM-GPG-KEY-CentOS-Testing-7
EFI GPL isolinux Packages RPM-GPG-KEY-CentOS-7 TRANS.TBL
[root@localhost ~]# yum makecache ##进行本地缓存
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink | 8.3 kB 00:00:00
test | 3.6 kB 00:00:00
(1/10): epel/x86_64/group_gz | 74 kB 00:00:00
(2/10): epel/x86_64/prestodelta | 781 B 00:00:01
(3/10): test/group_gz | 155 kB 00:00:00
(4/10): test/filelists_db | 6.6 MB 00:00:00
(5/10): test/primary_db | 5.6 MB 00:00:00
(6/10): test/o