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

在Linux环境下安装Oracle数据库时,遇到错误提示'DISPLAY not set. Please set the DISPLAY and try again.'。通过编辑'/etc/profile'文件,可以成功解决此问题,确保顺利进行Oracle的安装。另外,如果安装过程中出现界面乱码,可参照相关博客进行处理。

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

0.解决流程

解决流程

1.问题描述

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

[oracle@localhost 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
[oracle@localhost database]$ 

2.解决办法

#切换root用户
[oracle@localhost database]$ su root
密码:
#编辑/etc/profile文件,添加内容:export DISPLAY=:0.0
[root@localhost database]# vi /etc/profile
[root@localhost database]# cat /etc/profile
#省略……
export DISPLAY=:0.0
[root@localhost database]# source /etc/profile
[root@localhost database]# xhost +
access control disabled, clients can connect from any host
[oracle@localhost database]$ ls
doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html
[oracle@localhost 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. 请稍候...[oracle@localhost database]$ 

通过开放修改后/etc/profile文件后,即可正常安装oracle。
在这里插入图片描述

3 备注:若安装过程中出现oracle安装界面乱码

若安装过程中出现oracle安装界面乱码,则参考我的另一篇博客进行解决。
博客名称:解决Linux下oracle安装界面乱码
博客地址:https://blog.csdn.net/Zhangyanfeng1/article/details/107455271

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Zhangyanfeng1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值