Can't connect to X11 window server using 'localhost:0.0' 的解决

安装Oracle时出现如下错误

[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-06-07_12-13-22PM. Please wait ...[oracle@localhost database]$ Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
        at java.awt.Window.init(Unknown Source)
        at java.awt.Window.(Unknown Source)
        at java.awt.Frame.(Unknown Source)
        at oracle.ewt.popup.PopupFrame.(Unknown Source)
        at oracle.ewt.lwAWT.BufferedFrame.(Unknown Source)
        at oracle.sysman.oio.oioc.OiocOneClickInstaller.(OiocOneClickInstaller.java:378)
        at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:2091)

 

执行如下命令得以解决,而不是很多人说的export DISPLAY=localhost:0.0, 不知道为什么这样,有谁知道告诉我,[email protected] ,非常感谢

[oracle@localhost database]$ export DISPLAY=:0
[oracle@localhost database]$ su
Password:
[root@localhost database]# xhost + localhost
localhost being added to access control list

 

PS: xhost + hostname /IP : 指定的host就可以让Client端能使用当前服务器的X Server,即用服务器的显示设备做为终端来输出。

 

 

你可能感兴趣的:(〖Database〗)