When installing KVM, in order to facilitate the later installation of the virtual machine, GNOME Desktop is directly installed, so that you can directly operate and manage the desktop. After installing KVM related controls, start vncserver to report an error, as follows:
< p>[[emailprotected] home]# systemctl status -l [emailprotected]:1.service
● [emailprotected]:1.service-Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/[email protected]:1.service; enabled; vendor preset: disabled)
Active: inactive (dead) since 2019-07-30 10:01:37 CST; 7min ago
Main PID: 10855 (code=exited, status=0/SUCCESS)
July 30 10:01:34 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC) …
July 30 10:01:37 localhost.localdomain systemd[1]: Started Remote desktop service (VNC).
[[emailprotected] home]# vncserver
New’localhost.localdomain:1 (root)’ desktop is localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc /localhost.localdomain:1.log
Analysis by viewing the log:
[[email protected] home]# more /root/.vnc/localhost.localdomain:1.log
< p>Xvnc TigerVNC 1.8.0-built Nov 2 2018 19:05:14
Copyright (C) 1999-2017 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12001000, The X.Org Foundation
Tue Jul 30 10:04:03 2019
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
The XKEYBOARD keymap compiler (xkbcomp) reports:
Internal error: Could not resolve keysym XF86WWAN
Internal error: Could not resolve keysym XF86RFKill
Errors from xkbcomp are not fatal to the X server
Killing Xvnc process ID 11012
yum groupinstall “GNOME Desktop” “Graphical Administration Tools” -y
Total
1.6 MB/s | 2.4 MB 00:00:01
Running transaction check
Running transaction test
Transaction check error:
file /boot/efi/EFI/centos from install of fwupdate-efi-12-5.el7.centos.x86_64 conflicts with fi le from package grub2-common-1:2.02-0.64.el7.centos.noarch
Error summary:
This problem is caused by a conflict between the fwupdate-efi component and grub2-common, which leads to an installation error. At this time It can be handled by updating the grub2-common component.
As follows:
[[emailprotected] ~]# yum update grub2-common
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
- base: mirrors.aliyun.com
- epel: mirrors.aliyun.com
- extras: mirrors.aliyun.com
- updates: mirrors. aliyun.com
Resolving dependencies
–> Checking transactions
—> Package grub2-common.noarch.1.2.02-0.64.el7.centos will be upgraded
– -> Processing dependency grub2-common = 1:2.02-0.64.el7.centos, which is required by package 1:grub2-tools-2.02-0.64.el7.centos.x86_64
–> Processing dependency grub2-common = 1:2.02-0.64.el7.centos, it is required by package 1:grub2-tools-minimal-2.02-0.64.el7.centos.x86_64
–> Dependency is being processed grub2-common = 1:2.02-0.64.el7.centos, it is required by package 1:grub2-pc-2.02-0.64.el7.centos.x86_64
–> Processing dependency grub2-common = 1:2.02-0.64. el7.centos, it is required by package 1:grub2-pc-modules-2.02-0.64.el7.centos.noarch
–> The dependency is being processed grub2-common = 1:2.02-0.64.el7.centos, It is package 1: grub2-tools-extra-2.02-0.64.el7.centos.x86_64 requires
—> package grub2-common.noarch.1.2.02-0.76.el7.centos.1 will be Update
–> Checking the transaction
– –> The package grub2-pc.x86_64.1.2.02-0.64.el7.centos will be upgraded
–> The dependency is being processed grub2-pc = 1:2.02-0.64.el7.centos, which is used by the software Package 1: grub2-2.02-0.64.el7.centos.x86_64 requires
—> Package grub2-pc.x86_64.1.2.02-0.76.el7.centos.1 will be updated
— > Package grub2-pc-modules.noarch.1.2.02-0.64.el7.centos will be upgraded
—> Package grub2-pc-modules.noarch.1.2.02-0.76.el7.centos. 1 Will be updated
—> Package grub2-tools.x86_64.1.2.02-0.64.el7.centos will be replaced
—> Package grub2-tools.x86_64.1.2.02- 0.64.el7.centos will be upgraded
—> Package grub2-tools.x86_64.1.2.02-0.76.el7.centos.1 will be discarded
—> Package grub2-tools- extra.x86_64.1.2.02-0.64.el7.centos will be upgraded
—> Package grub2-tools-extra.x86_64.1.2.02-0.76.el7.centos.1 will be discarded
—> Package grub2-tools-minimal.x86_64.1.2.02-0.64.el7.centos will be upgraded
—> Package grub2-tools-minimal.x86_64.1.2.02-0.76.el7 .centos.1 will be discarded
–> Checking the transaction
—> Package grub2.x86_64.1.2.02-0.64.el7.centos will be upgraded
—> Package grub2.x86_64.1.2.02-0.64.el7.centos will be replaced
—> The package grub2.x86_64.1.2.02-0.76.el7.centos.1 will be discarded
–> Solution Dependency complete
Dependency resolution
======================================= ================================================== ===============================
Package architecture version source size
Installing:< br>grub2 x86_64 1:2.02-0.76.el7.centos.1 updates 31 k
Replace grub2.x86_64 1:2.02-0.64.el7.centos
grub2-tools x86_64 1:2.02-0.76.el7.centos .1 updates 1.8 M
Replace grub2-tools.x86_64 1:2.02-0.64.el7.centos
grub2-tools-extra x86_64 1:2.02-0.76.el7.centos.1 updates 995 k
Replace grub2-tools.x86_64 1:2.02-0.64.el7.centos
grub2-tools-minimal x86_64 1:2.02-0.76.el7.centos.1 updates 172 k
Replace grub2-tools.x86_64 1:2.02- 0.64.el7.centos
Updating:
grub2-common noarch 1:2.02-0.76.el7.centos.1 updates 728 k
Update for dependency:
grub2-pc x86_64 1:2.02 -0.76.el7.centos.1 updates 31 k
grub2-pc-modules noarch 1:2.02-0.76.el7.centos.1 updates 846 k
Transaction Summary
Install 4 packages
Upgrade 1 package (+2 dependent packages)
Total downloads: 4.5 M
Is this ok [y/d/N]: y
Downloading packages:
(1/7): grub2-2.02-0.76.el7.centos.1.x86_64.rpm | 31 kB 00:00:0 0
(2/7): grub2-pc-2.02-0.76.el7.centos.1.x86_64.rpm | 31 kB 00:00:00
(3/7): grub2-common-2.02- 0.76.el7.centos.1.noarch.rpm | 728 kB 00:00:00
(4/7): grub2-pc-modules-2.02-0.76.el7.centos.1.noarch.rpm | 846 kB 00:00:00
(5/7): grub2-tools-2.02-0.76.el7.centos.1.x86_64.rpm | 1.8 MB 00:00:00
(6/7): grub2- tools-extra-2.02-0.76.el7.centos.1.x86_64.rpm | 995 kB 00:00:00
(7/7): grub2-tools-minimal-2.02-0.76.el7.centos.1. x86_64.rpm | 172 kB 00:00:00
Total 4.5 MB/s | 4.5 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded< br>Running transaction
Updating: 1:grub2-common-2.02-0.76.el7.centos.1.noarch 1/14
Installing: 1:grub2-tools-minimal-2.02-0.76.el7. centos.1.x86_64 2/14
Installing: 1:grub2-tools-2.02-0.76.el7.centos.1.x86_64 3/14
Installing: 1:grub2-tools-extra-2.02- 0.76.el7.centos.1.x86_64 4/14
Updating: 1:grub2-pc-modules-2.02-0.76.el7.centos.1.noarch 5/14
Updating: 1:grub2- pc-2.02-0.76.el7.centos.1.x86_64 6/14
Now Installation: 1:grub2-2.02-0.76.el7.centos.1.x86_64 7/14
Cleanup: 1:grub2-2.02-0.64.el7.centos.x86_64 8/14
Cleanup: 1:grub2- pc-2.02-0.64.el7.centos.x86_64 9/14
Clean up: 1:grub2-tools-extra-2.02-0.64.el7.centos.x86_64 10/14
Clean up: 1:grub2-pc- modules-2.02-0.64.el7.centos.noarch 11/14
Clean up: 1:grub2-tools-minimal-2.02-0.64.el7.centos.x86_64 12/14
Clean up: 1:grub2-tools- 2.02-0.64.el7.centos.x86_64 13/14
Cleaning up: 1:grub2-common-2.02-0.64.el7.centos.noarch 14/14
Verifying: 1:grub2-pc-2.02-0.76 .el7.centos.1.x86_64 1/14
Verifying: 1:grub2-common-2.02-0.76.el7.centos.1.noarch 2/14
Verifying: 1:grub2-tools-2.02 -0.76.el7.centos.1.x86_64 3/14
Verifying: 1:grub2-2.02-0.76.el7.centos.1.x86_64 4/14
Verifying: 1:grub2-pc-modules -2.02-0.76.el7.centos.1.noarch 5/14
Verifying: 1:grub2-tools-minimal-2.02-0.76.el7.centos.1.x86_64 6/14
Verifying: 1 :grub2-tools-extra-2.02-0.76.el7.centos.1.x86_64 7/14
Verifying: 1:grub2-tools-minimal-2.02-0.64.el7.centos.x86_64 8/14
Verifying: 1:grub2-tools-extra-2.02-0.64.el7.centos.x86_ 64 9/14
Verifying: 1:grub2-pc-2.02-0.64.el7.centos.x86_64 10/14
Verifying: 1:grub2-common-2.02-0.64.el7.centos.noarch 11 /14
Verifying: 1:grub2-tools-2.02-0.64.el7.centos.x86_64 12/14
Verifying: 1:grub2-tools-2.02-0.64.el7.centos.x86_64 13/14
Verifying: 1:grub2-2.02-0.64.el7.centos.x86_64 14/14
Verifying: 1:grub2-2.02-0.64.el7.centos.x86_64 15/14
Verifying: 1:grub2-pc-modules-2.02-0.64.el7.centos.noarch 16/14
Installed:
grub2.x86_64 1:2.02-0.76.el7.centos.1 grub2-tools .x86_64 1:2.02-0.76.el7.centos.1
grub2-tools-extra.x86_64 1:2.02-0.76.el7.centos.1 grub2-tools-minimal.x86_64 1:2.02-0.76.el7.centos .1
Update complete:
grub2-common.noarch 1:2.02-0.76.el7.centos.1
Is upgraded as a dependency:
grub2-pc. x86_64 1:2.02-0.76.el7.centos.1 grub2-pc-modules.noarch 1:2.02-0.76.el7.centos.1
Alternative:
grub2.x86_64 1:2.02-0.64 .el7.centos grub2-tools.x86_64 1:2.02-0.64.el7.centos
Done!
[[emailprotected] ~]#
Then reinstall
yum groupinstall “GNOME Desktop” “Graphical Administration Tools” -y
[[emailprotected] ~]# systemctl status -l [emailprotected]:1.service
● [emailprotected]:1.service-Remote desktop service (VNC)
Loaded: loaded (/usr /lib/systemd/system/[email protected]:1.service; enabled; vendor preset: disabled)
Active: active (running) since 2019-07-30 11:09:26 CST; 12s ago
Main PID: 45172 (Xvnc)
CGroup: /system.slice/system-vncserver.slice/[email protected]:1.service
? 45172 /usr/bin/Xvnc :1 -auth /root/ .Xauthority -desktop localhost.localdomain:1 (root) -fp catalogue:/etc/X11/fontpath.d -geometry 1024×768 -pn -rfbauth /root/.vnc/passwd -rfbport 5901 -rfbwait 30000
July 30 11:09:23 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)…July 30 11:09:26 localhost.localdomain systemd[1]: Started Remote desktop service (VNC) .At this time, just start vncser.