Yum installation error [Errno 14] Could not open/read file:///mnt/cdrom/HighAvailability/repodata/repomd.xml

1. yum install installation error:

# 执行yum命令
yum install xxx.rpm
# 报错
# [Errno 14] Could not open/read file:///mnt/cdrom/HighAvailability/repodata/repomd.xml

Reason: The linux image of the virtual machine is not mounted

2. Execute the mount command:

# 执行挂载命令
mount /dev/sr0 /mnt/cdrom/
# 报错
# mount: you must specify the filesystem type

Reason: The ISO image file corresponding to the linux system is not loaded into the CD-ROM drive of the virtual machine

3. Mount the iso image file on the virtual machine

4. Execute the mount mount command again. After the mount is successful, use yum to install again and no error will be reported.

# 再次执行挂载命令
mount /dev/sr0 /mnt/cdrom/
# 成功
# mount: block device /dev/sr0 is write-protected, mounting read-only

Guess you like

Origin blog.csdn.net/qq_17685725/article/details/126274363