日期:2014-05-17  浏览次数:21149 次

Can't connect to X11 window server using '127.0.0.1:0.0' as the value of the DISPLAY variable.
操作系统:RedHat   EnterpriseAS   release   4   (Nahant   Update   4)
Oracle版本:oracle   9.2.0

安装时出现的这个问题,可以排除是xhost的问题,xhost   会有一个   refuse   的提示,我遇到后就给本机加上了:
xhost   +127.0.0.1
xhost   +localhost

在   $ORACLE_BASE下的   .bashrc   文件,DISPLAY   变量加不加、加127.0.0.1或localhost都试过了。

然后运行   runInstaller   就是一个单纯的错误:
Can 't   connect   to   X11   window   server   using   '127.0.0.1:0.0 '   as   the   value   of   the   DISPLAY   variable.

那一堆异常消息网上一搜一大把,但就是没找到能解决的。。。

搜到个老外的答案是这样的:
2)   you 're   logged   into   the   machine   as   one   user   (like   root)   but   you 're   trying   to   install   as   another   user   (like   oracle).

这个问题在用   root   登录完后   su   成   oracle   不行吗?

本来想试试用   oracle   直接登录系统的,但不知道系统哪里没装好,oracle用户就是登录不上去,所以就没法试验这个方法了。。。

------解决方案--------------------
用oracle用户直接登录,然后runInstaller 试试

------解决方案--------------------
如果上面不行 在终端里 以root用户执行 #xhost +
然后su - oracle
执行#export DISPLAY=:0
运行runinstaller