After CentOS7.6 using Minimal minimal installation, the installation fails graphical interface, the startx fails

Online concerning CentOS7 start the graphical interface failure posts using the command startx lot, but to find a day did not solve my problem, then put himself out of the pit process rehearse, and then there is the process of climbing out, if there are similar experiences students can refer look see if I can climb out of the pit.

1. First list what question:
I encountered a total of two question

One problem is when you start desktop program, that startx, reported:

[root@localhost vmware-tools-distrib]# startx
xauth:  file /root/.serverauth.1729 does not exist

xinit: unable to run server "/usr/bin/X": No such file or directory
Use the -- option, or make sure that /usr/bin is in your path and
that "/usr/bin/X" is a program or a link to the right type of server
for your display.  Possible server names include:

    Xorg        Common X server for most displays
    Xvfb        Virtual frame buffer
    Xfake       kdrive-based virtual frame buffer
    Xnest       X server nested in a window on another X server
    Xephyr      kdrive-based nested X server
    Xvnc        X server accessed over VNC's RFB protocol
    Xdmx        Distributed Multi-head X server

Cxinit ^: Giving up
xinit: Unable to Connect to the X-Server: Connection refused The
xinit: Unexpected Signal 2

this wrong to online answers to the strange, the search for a long time have not been resolved. Some students may have encountered a similar error or the same error, the root cause of this problem is, I do not know, but I'm a bit reproduce this error, I found the cause of this error is encountered, it may be for this reason also others why not start graphical interface. It can be used as a reference.

2. My reproduction process
I was out of the pit of the process in accordance with the following:

I use CentOS official Minimal mirror made to minimize installation and use of this version is CentOS-7-x86_64-Minimal- 1810.iso
then I even went online source, it has been updated with a source of 163- 163 centos7.6-mirror
and then I want to install a graphical interface, I downloaded the ISO in CentOS7 Everything's official website, using a mirror source download of Tsinghua
I will mount the iso to a CD as a virtual machine inside the / mnt directory, use disposed below the disc as the reference source file for mounting
[the root @ localhost ~] # CAT /etc/yum.repos.d/bak/local.repo
[LocalRepo]
name = the Local the Repository
BaseURL = file: /// mnt
Enabled 1 =
gpgcheck = 1
gpgkey = File: /// etc / pki / RPM-gpg / RPM-GPG-KEY-CentOS-7

command is used to install:
yum groupinstall "the GNOME Desktop" "the Graphical Administration Tools"
1
then reported some mistakes that I have installed the package version than the current version of the package to be installed, I do not care, added a direct transfer parameters passed, as follows:
yum groupinstall "the GNOME Desktop" "the Graphical Administration Tools" - Broken-the --skip
1
Setup displays need to install the package size of approximately 165MB, and there are many online posts suggested that 700MB is different, because of the use of a mirror is Everything, so the package is relatively small.
After installing run startx can not start up, there is a problem described in 1.
After recovery disk analysis, I think the reason for the failure of my installation, is the middle should have done once update, version of the package than the result in the mirror a lot higher , resulting in a mirror when using the installation package again, many rely on the automatic version would not be able to solve. A direct result of the failure to start after the forced installation.

3. repair experiments
after encountering this problem and to successfully reproduce, I conducted two experiments:

Use Minimal installation, not to update, install using Everything graphically
replay reproduced steps to uninstall graphics software installation, repair
top two experiments, the first to do a good, direct success. The case description of the package version matching, should be able to start the graphical interface directly, all run commands are the same, no change.

The second experiment is also well done, with emphasis on how to fix. Because this step is already a memory update, upgrade software a lot, they can not all go back to go back, so I was thinking of installing a graphical interface directly with the source of the Internet software. Run directly after the installation is successful. The need to download the installation package of about 700 MB, and online post said relatively consistent.

4. repair scheme determined
experimentally step 3, step 3 is determined using the second experiment conclusions to repair. Due to problems of the environment is an offline environment, it is necessary to adopt off-line program for software installation.
Offline installation in two ways:

The desktop installation package downloaded, make mirror source
will download source repository 163, made of mirror source

发布了447 篇原创文章 · 获赞 71 · 访问量 40万+

Guess you like

Origin blog.csdn.net/w892824196/article/details/104049288