Oracle 12c 安装错误:“异常...无法初始化类 sun.awt.X11.XToolkit”

Oracle 12c 安装错误:“异常...无法初始化类 sun.awt.X11.XToolkit”

我一直尝试在 Ubuntu 14.10 上安装 oracle 12 c,但遇到下面提到的错误。有人可以检查一下并告诉我如何修复这个错误吗?

Checking Temp space: must be greater than 500 MB.   Actual 429214 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4041 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/OraInstall2014-10-27_11-15-08PM. Please wait ...oracle@v3nky-HP-Pavilion-dv6-Notebook-PC:~$ No protocol specified
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:171)
    at java.awt.Toolkit$2.run(Toolkit.java:834)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
    at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
    at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:249)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1852)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:557)
    at oracle.install.commons.util.Application.startup(Application.java:792)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:198)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:355)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:130)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:161)

答案1

检查你的系统中是否安装了某些 JDK:

$ java -version

安装 JDK 7 解决了我的问题:

$ sudo apt-get install openjdk-7-jre-headless

如果问题仍然存在,请以 root 身份登录,然后执行:

$ xhost +

切换回另一个用户并再次运行安装。

答案2

我也遇到过这种情况。以 root 身份执行xhost +后,它就起作用了。

答案3

解决办法,复制文件:

cp /root/.Xauthority /home/grid/.Xauthority

确保用户可以通过以下方式读取和写入文件:

chmod 600 /home/grid/.Xauthority
chown grid /home/grid/.Xauthority

相关内容