在安装KVM时,为了方便后期安装虚拟机,直接安装了GNOME Desktop,这样可以直接桌面型操作管理,在安装KVM相关控件后,启动vncserver报错,如下:
[root@localhost home]# systemctl status -l vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@: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)
7月 30 10:01:34 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)...
7月 30 10:01:37 localhost.localdomain systemd[1]: Started Remote desktop service (VNC).
[root@localhost 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
通过查看日志分析:
[root@localhost home]# more /root/.vnc/localhost.localdomain:1.log
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
总计
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 file from package grub2-common-1:2.02-0.64.el7.centos.noarch
错误概要:
该问题是由于fwupdate-efi 组件与grub2-common冲突导致安装出错,这时可以通过更新grub2-common组件,来处理。
如下:
[root@localhost ~]# yum update grub2-common
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
依赖关系解决
========================================================================================================================
Package 架构 版本 源 大小
正在安装:
grub2 x86_64 1:2.02-0.76.el7.centos.1 updates 31 k
替换 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
替换 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
替换 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
替换 grub2-tools.x86_64 1:2.02-0.64.el7.centos
正在更新:
grub2-common noarch 1:2.02-0.76.el7.centos.1 updates 728 k
为依赖而更新:
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
安装 4 软件包
升级 1 软件包 (+2 依赖软件包)
总计 4.5 MB/s | 4.5 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在更新 : 1:grub2-common-2.02-0.76.el7.centos.1.noarch 1/14
正在安装 : 1:grub2-tools-minimal-2.02-0.76.el7.centos.1.x86_64 2/14
正在安装 : 1:grub2-tools-2.02-0.76.el7.centos.1.x86_64 3/14
正在安装 : 1:grub2-tools-extra-2.02-0.76.el7.centos.1.x86_64 4/14
正在更新 : 1:grub2-pc-modules-2.02-0.76.el7.centos.1.noarch 5/14
正在更新 : 1:grub2-pc-2.02-0.76.el7.centos.1.x86_64 6/14
正在安装 : 1:grub2-2.02-0.76.el7.centos.1.x86_64 7/14
清理 : 1:grub2-2.02-0.64.el7.centos.x86_64 8/14
清理 : 1:grub2-pc-2.02-0.64.el7.centos.x86_64 9/14
清理 : 1:grub2-tools-extra-2.02-0.64.el7.centos.x86_64 10/14
清理 : 1:grub2-pc-modules-2.02-0.64.el7.centos.noarch 11/14
清理 : 1:grub2-tools-minimal-2.02-0.64.el7.centos.x86_64 12/14
清理 : 1:grub2-tools-2.02-0.64.el7.centos.x86_64 13/14
清理 : 1:grub2-common-2.02-0.64.el7.centos.noarch 14/14
验证中 : 1:grub2-pc-2.02-0.76.el7.centos.1.x86_64 1/14
验证中 : 1:grub2-common-2.02-0.76.el7.centos.1.noarch 2/14
验证中 : 1:grub2-tools-2.02-0.76.el7.centos.1.x86_64 3/14
验证中 : 1:grub2-2.02-0.76.el7.centos.1.x86_64 4/14
验证中 : 1:grub2-pc-modules-2.02-0.76.el7.centos.1.noarch 5/14
验证中 : 1:grub2-tools-minimal-2.02-0.76.el7.centos.1.x86_64 6/14
验证中 : 1:grub2-tools-extra-2.02-0.76.el7.centos.1.x86_64 7/14
验证中 : 1:grub2-tools-minimal-2.02-0.64.el7.centos.x86_64 8/14
验证中 : 1:grub2-tools-extra-2.02-0.64.el7.centos.x86_64 9/14
验证中 : 1:grub2-pc-2.02-0.64.el7.centos.x86_64 10/14
验证中 : 1:grub2-common-2.02-0.64.el7.centos.noarch 11/14
验证中 : 1:grub2-tools-2.02-0.64.el7.centos.x86_64 12/14
验证中 : 1:grub2-tools-2.02-0.64.el7.centos.x86_64 13/14
验证中 : 1:grub2-2.02-0.64.el7.centos.x86_64 14/14
验证中 : 1:grub2-2.02-0.64.el7.centos.x86_64 15/14
验证中 : 1:grub2-pc-modules-2.02-0.64.el7.centos.noarch 16/14
已安装:
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
更新完毕:
grub2-common.noarch 1:2.02-0.76.el7.centos.1
作为依赖被升级:
grub2-pc.x86_64 1:2.02-0.76.el7.centos.1 grub2-pc-modules.noarch 1:2.02-0.76.el7.centos.1
替代:
grub2.x86_64 1:2.02-0.64.el7.centos grub2-tools.x86_64 1:2.02-0.64.el7.centos
完毕!
[root@localhost ~]#
然后在重新安装
yum groupinstall "GNOME Desktop" "Graphical Administration Tools" -y
[root@localhost ~]# systemctl status -l vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@: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/vncserver@:1.service
? 45172 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop localhost.localdomain:1 (root) -fp catalogue:/etc/X11/fontpath.d -geometry 1024x768 -pn -rfbauth /root/.vnc/passwd -rfbport 5901 -rfbwait 30000
7月 30 11:09:23 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)...
7月 30 11:09:26 localhost.localdomain systemd[1]: Started Remote desktop service (VNC).
这时在启动vncser就可以。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。