欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决Linux下安装oracle提示DISPLAY not set. Please set the DISPLAY and try again.方法

程序员文章站 2022-05-19 10:53:49
...

解决Linux下安装oracle提示DISPLAY not set. Please set the DISPLAY and try again.方法

0.解决流程

解决Linux下安装oracle提示DISPLAY not set. Please set the DISPLAY and try again.方法

1.问题描述

linux下安装oracle时遇到如下错误提示:DISPLAY not set. Please set the DISPLAY and try again.,详见如下:

[aaa@qq.com database]$ ./runInstaller 
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 7711 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2047 MB    Passed
Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] y


>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-07-19_10-08-27AM. Please wait ...
DISPLAY not set. Please set the DISPLAY and try again.
Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
- For csh:  			% setenv DISPLAY 192.168.1.128:0.0
- For sh, ksh and bash: 	$ DISPLAY=192.168.1.128:0.0; export DISPLAY
Use the following command to see what shell is being used:
	echo $SHELL
Use the following command to view the current DISPLAY environment variable setting:
	echo $DISPLAY
- Make sure that client users are authorized to connect to the X Server.
To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
% xhost +
To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':
	% <full path to xclock.. see below>
If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
Typical path for xclock: /usr/X11R6/bin/xclock
[aaa@qq.com database]$ 

2.解决办法

#切换root用户
[aaa@qq.com database]$ su root
密码:
#编辑/etc/profile文件,添加内容:export DISPLAY=:0.0
[aaa@qq.com database]# vi /etc/profile
[aaa@qq.com database]# cat /etc/profile
#省略……
export DISPLAY=:0.0
[aaa@qq.com database]# source /etc/profile
[aaa@qq.com database]# xhost +
access control disabled, clients can connect from any host
[aaa@qq.com database]$ ls
doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html
[aaa@qq.com database]$ ./runInstaller 
正在启动 Oracle Universal Installer...

检查临时空间: 必须大于 120 MB。   实际为 7320 MB    通过
检查交换空间: 必须大于 150 MB。   实际为 2047 MB    通过
检查监视器: 监视器配置至少必须显示 256 种颜色。    实际为 16777216    通过
准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2020-07-19_10-32-04AM. 请稍候...[aaa@qq.com database]$ 

通过开放修改后/etc/profile文件后,即可正常安装oracle。
解决Linux下安装oracle提示DISPLAY not set. Please set the DISPLAY and try again.方法