关于Ubuntu下安装Oracle数据库的问题——Could not execute auto check for display colors using command /usr/bin/xdpy

问题描述:执行./runInstaller命令,出现以下错误
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

关于Ubuntu下安装Oracle数据库的问题——Could not execute auto check for display colors using command /usr/bin/xdpy
本人系统:阿里云ubuntu16.04 64位(没有图形界面),百度一下如何安装图形界面,就几条命令而已。

必备条件: 安装ubuntu的图像界面(原因,oracle安装界面是有界面的,否则会报这种错),上阿里云官网远程连接ubuntu再操作。后续更新,如何在本地连接远程ubuntu服务器。

解决方案:
参考了下其它的资料,有的方案简单,有的方案复杂。复杂的如需要安装一个x-window什么的(不采取)。
简单的发现不可以,其实只要重启下服务器系统再进行如下操作就可以了。

方案一:
1.root登录:su -l root

2.执行命令:xhost SI:localuser:oracle
关于Ubuntu下安装Oracle数据库的问题——Could not execute auto check for display colors using command /usr/bin/xdpy

3.切换回oracle用户,继续执行./runInstaller命令,检查通过:
关于Ubuntu下安装Oracle数据库的问题——Could not execute auto check for display colors using command /usr/bin/xdpy
这里的swap space我在root用户下已经配置过了,不知道为什么这里又显示为0,但是可以正常显示oracle的安装界面。
关于Ubuntu下安装Oracle数据库的问题——Could not execute auto check for display colors using command /usr/bin/xdpy

方案二:
如果以上方法不行,则不要在root下切换用户,需注销root用户,再用oracle用户登录后,再执行./runInstaller。

总结: 在ubuntu上安装oracle花费了我很长的一段时间,这回终于出现了安装界面了,但是却没有那么激动,可能是时间太长,麻木了吧。先记录到这里,希望能安装成功。顺便说一下,最好下载oracle官方的配置文档来看,否则看网友的教程是很浪费时间的,有的只是一部分,不全等。