2019/11/7--亲测centos7安装oracle解决Could not execute auto check for display colors using command以及未弹出图形界面

安装oracle时./runInstaller报错:

Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.

具体错误信息如下:
[oracle@glxybd database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 1008384 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 16128 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/OraInstall2019-11-06_11-13-35PM. Please wait ...[oracle@glxybd database]$ Exception in thread "main" java.lang.NoClassDefFoundError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:164)
	at java.awt.Toolkit$2.run(Toolkit.java:821)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
	at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
	at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
	at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:242)
	at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
	at oracle.install.commons.util.Application.startup(Application.java:758)
	at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
	at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
	at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
	at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
	at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

原因是oracle客户端ssh认证出现问题 。

当你设置的是export DISPLAY=:10.0时,执行echo $DISPLAY查看DISPLAY是正常的
在这里插入图片描述
但运行xterm时报错,这才是导致上面异常的原因
未识别

解决方法

root角色执行echo $DISPLAY,发现为 xxx:10.0
[root@glxybd ~]# echo $DISPLAY
localhost:10.0
xauth list找到 :10 对应的那行并复制内容
[root@glxybd ~]#  xauth list
glxybd.ctbu.edu.cn/unix:7  MIT-MAGIC-COOKIE-1  08047574ce998c3b95d87fea02ea0a9b
glxybd.ctbu.edu.cn/unix:10  MIT-MAGIC-COOKIE-1  cb15548cf27a3b2dbfe7c50b3d1b79b3
切换到oracle角色su - oracle,然后执行以下语句添加xauth到oracle认证信息中

注意:向oracle中添加时必须与root角色复制时处在同一次连接操作,不然重新连接服务器时xauth list查询时可能会变

xauth add glxybd.ctbu.edu.cn/unix:10  MIT-MAGIC-COOKIE-1  cb15548cf27a3b2dbfe7c50b3d1b79b3
执行xauth list查看oracle的xauth 信息是否成功添加
[oracle@glxybd root]$ xauth list
glxybd.ctbu.edu.cn/unix:10  MIT-MAGIC-COOKIE-1  cb15548cf27a3b2dbfe7c50b3d1b79b3
设置并查看oracle角色的DISPLAY
[oracle@glxybd root]$ export DISPLAY=:10.0
[oracle@glxybd root]$ echo $DISPLAY
:10.0

如果配置了图形化界面可跳过直接执行./runInstaller即可成功弹出安装界面,没有配置的话不会弹出界面但也不会报错,可参考下面的图形化界面配置。


配置图形化界面
  1. 先看看是否配置,如果执行xclock报错,command not found
    yum install xorg-x11-apps
  2. 安装X窗口包和字体包
    yum -y groupinstall "X Window System" "Fonts"(安装x窗口相关包,和字体显示包)
  3. 安装xmanager(步骤略…),设置xshell的隧道关联xmanager
    在这里插入图片描述
  4. 关闭当前窗口,重新打开新的窗口进行测试
    xclock会出现时钟界面

执行./runInstaller成功打开窗口。如果未成功打开窗口但也未报错,可能是没配置图形化界面(参考上面配置步骤)。
效果图:
在这里插入图片描述

参考文章: Getting “Xlib: PuTTY X11 proxy: wrong authentication protocol attempted”? I have the answer 😃

  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值