无法在 Ubuntu 上运行 sqldeveloper

无法在 Ubuntu 上运行 sqldeveloper

sqldeveloper我尝试通过以下方式安装:

Download SQL Developer from Oracle website (I chose Other Platforms download).

Extract file to /opt:

sudo unzip sqldeveloper-*-no-jre.zip -d /opt/
sudo chmod +x /opt/sqldeveloper/sqldeveloper.sh
Linking over an in-path launcher for Oracle SQL Developer:

sudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
Edit /usr/local/bin/sqldeveloper.sh replace it's content to:

#!/bin/bash
cd /opt/sqldeveloper/sqldeveloper/bin
./sqldeveloper "$@"
Run SQL Developer:

sqldeveloper

但它显示下一个输出:

nazar@lelyak-desktop:/opt/sqldeveloper⟫ ./sqldeveloper.sh 

 Oracle SQL Developer
 Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.    

 LOAD TIME : 401#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f3b2dcacbe0, pid=20351, tid=139892273444608
#
# JRE version: Java(TM) SE Runtime Environment (7.0_65-b17) (build 1.7.0_65-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  0x00007f3b2dcacbe0
#
# Core dump written. Default location: /opt/sqldeveloper/sqldeveloper/bin/core or core.20351
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid20351.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
/opt/sqldeveloper/sqldeveloper/bin/../../ide/bin/launcher.sh: line 1193: 20351 Aborted                 (core dumped) ${JAVA} "${APP_VM_OPTS[@]}" ${APP_ENV_VARS} -classpath ${APP_CLASSPATH} ${APP_MAIN_CLASS} "${APP_APP_OPTS[@]}"
134 nazar@lelyak-desktop:/opt/sqldeveloper⟫ java -version
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

以下是/tmp/hs_err_pid20351.log

如何解决这个烦恼呢?

答案1

也受到影响但找到了解决方案这里

解决方案很简单,在启动 sh sqldeveloper.sh 之前取消设置环境变量GNOME_DESKTOP_SESSION_ID,或者您可以像这样创建另一个 launcher.sh:
unset GNOME_DESKTOP_SESSION_ID sh sqldeveloper.sh

答案2

我遇到了同样的问题,但尚未解决。我发现了邮政并提出建议。

1)安装OpenJDK

sudo apt-get install openjdk-7-jdk

2)打开配置文件

vim ~/.sqldeveloper/4.0.0/product.conf

3)改变


编辑:

我必须删除 OpenJDK 并重新安装才能让它正常工作。我认为链接出了问题。

SetJavaHome /usr/lib/jvm/java-7-openjdk-amd64

答案3

对我来说,我只需要设置设置JavaHome包含 JDK 路径的条目~/.sqldeveloper/4.1.0/product.conf而且效果非常好。

相关内容