DISPLAY not set. Please set the DISPLAY and try again processing method (Oracle installation is more common)

             DISPLAY not set. Please set the DISPLAY and try again processing method (Oracle installation is more common)

The error shown in the title usually appears when installing the Oracle software. The reason is that the installation of Oracle requires the support of a graphical interface, and Linux usually does not install the desktop. After the gnome or kde desktop is installed separately in the later period, the system lacks an environment variable As a result, the Oracle detection environment is not passed and the above error is reported. ( Note a prerequisite, the desktop must have been started, usually the startx command can be used to start the desktop )

Solution: Under the root user, execute the command xdpyinfo command, the output will be a lot, depending on what is behind the name of display, for example, my machine is: 0, maybe other machines have another value, in short, use the xdpyinfo command to query The result shall prevail.

Usually the root user can execute the xhost + command successfully without setting any variables, but under the Oracle user or other ordinary users, it prompts that it cannot connect:

Switch to the Oracle user, vim ~/.bash_profile #Add the following environment variables at the end of the file:

DISPLAY=:0

export DISPLAY

Save and exit, execute the command source ~/.bash_profile xhost + these two commands.

The correct output of xhost + should be, and the rest are wrong (xhost is a program to check whether the display settings are correct):

  Indicates that machines at any location are allowed to use the desktop

 

Guess you like

Origin blog.csdn.net/alwaysbefine/article/details/112399500