This is a fairly straightforward guide to install Oracle SQL Developer on Ubuntu 20.04
Gathering Files
Prerequisite
- Oracle JDK 8/11
- Oracle SQL Developer
Downloading Prerequisite
Oracle JDK 8/11
- Go to download Oracle JDK page
- I will use Oracle JDK 11 because it has a .deb installation file which can be easily installed using
dpkg
- Download Oracle JDK 11 for Debian package (at the time of this post, the version is 11.0.8), you will be prompted to sign in using oracle account to download
Oracle SQL Developer
- Go to download Oracle SQL Developer page
- Download Oracle SQL Developer for Other Platforms (at the time of this post, the version is 20.2)
Prerequisite Completed
Installation
Install Oracle JDK 11 and Oracle SQL Developer
Oracle JDK 11
- Open your terminal, go to directory where your prerequisite files are located (in my case it's in
~/Downloads
) - Install Oracle JDK 11 by using command
sudo dpkg -i [YOUR_ORACLE_JDK_PACKAGE.deb]
, in my case it'ssudo dpkg -i jdk-11.0.8_linux-x64_bin.deb
- Verify your installation by listing the directory of
/usr/lib/jvm
Oracle SQL Developer 20.2
- Open your terminal, go to
/opt
directory. This is where i will store the sqldeveloper application, you can choose other directory, but this my preference (and i read also that/opt
is for 3rd party apps that we cannot install viaapt
package manager) - Unzip Oracle SQL Developer with command
sudo unzip [YOUR_SQL_DEVELOPER_FILE_WITH_LOCATION].zip
, in my case it'ssudo unzip ~/Downloads/sqldeveloper-20.2.0.175.1842-no-jre.zip
. By default theunzip
program will extract the zip file into the current directory, since we are in/opt
now, we don't need to specify target directory. - Locate your Oracle JDK installation under
/usr/lib/jvm
, we'll need this location to tell Oracle SQL Developer where our Oracle JDK is located. In my case it's/usr/lib/jvm/jdk-11.0.8
- Go inside the
sqldeveloper
directory - You can see that
sqldeveloper.sh
has executable permission so that we can run it by doing./sqldeveloper.sh
orsh sqldeveloper.sh
in the current directory. - Run the
sqldeveloper.sh
file, you will be prompted to enter the Oracle JDK location, just paste it in and press enter - You will see Oracle SQL Developer starting
- Installation done! You can use the application by executing the
sqldeveloper.sh
At this point, the installation process is done and we can use the application. But it's quite troublesome for us to always open the terminal and execute the script to run the application.
Create a Shortcut
Create a link to our sqldeveloper.sh
- Open your terminal and type command
sudo ln -s [YOUR_SQLDEVELOPER.SH_PATH] /usr/local/bin/sqldeveloper
, in my case it'ssudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
- Verify that link has been created.
- Now we can execute our application with command
sqldeveloper
from any directory. The reason why we put our link inside/usr/local/bin
is so that it's available globally. - Go to your
$HOME
directory and execute the commandsqldeveloper
. You will get an error like this. - The error happened because it's trying to execute a syntax inside
sqldeveloper.sh
that uses relative path to navigate the directory. To fix this problem, what we need to do is edit thesqldeveloper.sh
to execute the sqldeveloper binary - Open
sqldeveloper.sh
with your text editor. In my case, i will usevim
. Remember to usesudo
because this file belongs toroot
. Your file content should look like this now. - We will tell this script to execute the sqldeveloper binary directly without navigating to other directory by using this command
/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper $*
, your file should look like this now. - Save the file and try
sqldeveloper
command again, you should be able to start Oracle SQL Developer now.
Create a desktop shortcut
- Desktop shortcuts are stored in
/usr/share/applications
with.desktop
extension. So we will create a new file in that directory with the namesqldeveloper.desktop
. - Inside your file should look like this. ```
[Desktop Entry]
Name=Oracle SQL Developer
Comment=SQL Developer from Oracle
GenericName=SQL Tool
Exec=/usr/local/bin/sqldeveloper
Icon=/opt/sqldeveloper/icon.png
Type=Application
StartupNotify=true
Categories=Utility;Oracle;Development;SQL;
3. Save your file
4. Verify that your shortcut is available to use by searching in application menu.
![Shorcut](https://dev-to-uploads.s3.amazonaws.com/i/oz9au239m5ej0zkxtqr2.png)
And that's it. You have completed the installation and created shortcut for Oracle SQL Developer.
Top comments (36)
Thank you so much for this post. I wanted to run SQL Developer on Ubuntu 20.04 but I didn't know that .deb packages were listed under Other Platforms for Linux. I was bummed by the .rpm files. Now, I also want to connect to Oracle Database locally. Could you make another article for that? Thanks and thanks.
Thanks for this, at first I downloaded a linux version and it didn't work. After that I removed that version, btw I could not do it with the ubuntu software upgrade tool so did a delete java from the GUI, and downloaded the debian one. The install took place but could not find the /usr/lib/jvm with the GUI. If you use mlocate it is there. So I just passed that path when I started pl/sql dev. Now, it works....!
Hello Ishak, thanks for sharing your knowledge. Are there some way to change the jdk. I use the jdk 15 but it not working properly. The sqldeveloper crash than of a time when is connected to an amazon database.
I followed your tutorial on jdk and sqldeveloper, which works well, thank you very much, but I can't program the PLSQL, and I'm asked to connect to the oracle database.
Could you provide me with a tutorial on how to install an oracle database on ubuntu?
Thank you very much
Thanks for such precise description!
Small issue: when running sqldeveloper from desktop shortcut, error occurs while connecting to DB:
Status : Failure -Test failed: no ocijdbc21 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
I was having the same problem. I solved by specifying within the sqldeveloper the folder where tnsnames.ora is located
Facing this issue when stating sql developer :
A fatal error has been detected by the Java Runtime Environment:
SIGBUS (0x7) at pc=0xxxxxx, pid=xxxxx, tid=xxxx
JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.11+9) (build 11.0.11+9-LTS-194)
Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.11+9-LTS-194, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
Problematic frame:
C [ld-linux-x86-64.so.2+0xxxxxx]
Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /opt/sqldeveloper/sqldeveloper/bin/core.46471)
Thank you for a very precise and easy to follow guide. Everything works as expected.
Nice content thank you very much
Thanks for such precise description!
Thanks man, that saved me, now i can study