Updated Way to Install SQL Developer on Ubuntu

Thanks to Hans’ comment, I found out that SQL Developer is now in the Ubuntu repositories!  I thought that it was time to adjust my installation procedure to just install from the repository, but it’s not that easy.  I’ll let you decide if you want to use this method or stick with the faithful “unzip the package” method.

When searching for SQL Developer in the Software Center, I found that you have to type it as a single word with no spaces:

SQL Developer in Ubuntu Software Center

Then, I downloaded the zip file from Oracle’s SQL Developer Download Page.  I chose the “Other Platforms” link to get the zip file.

Downloading SQL Developer

When I saved the zip file, I placed it in a directory I created under my home directory call sqldeveloper.  It doesn’t really matter where you place it as long as you know the path and can type it in the command to build the package.

Next, I tried to run the program, but I got a chmod error message:


skp@chestnut:~/sqldeveloper$ make-sqldeveloper-package -b output sqldeveloper-3.2.20.09.87-no-jre.zip
chmod: missing operand after `755'
Try `chmod --help' for more information.

Thanks to Mark on Unmicable, I edited the make-sqldeveloper-package program to fix it.  (Apparently, there is a bug report out for this, too)  I changed line #381 in /usr/bin/make-sqldeveloper-package to this:

${FIND} "${OPTDIR}" ! \( -type d -o -name "*.jar" \) |${XARGS} ${XARGS_OPTS} ${FILE} ${FILE_OPTS} |${GREP} ${GREP_OPTS} "shell script" | ${GREP} ${GREP_OPTS} "text executable" |${CUT} ${CUT_OPTS_FUNC_CLEAN} |${XARGS} ${XARGS_OPTS} ${CHMOD} ${CHMOD_OPTS}

Once I got that fixed, I could run the program like this:


skp@chestnut:~$ cd sqldeveloper/
skp@chestnut:~/sqldeveloper$ ls
sqldeveloper-3.2.20.09.87-no-jre.zip
skp@chestnut:~/sqldeveloper$ mkdir output
skp@chestnut:~/sqldeveloper$ make-sqldeveloper-package -b output sqldeveloper-3.2.20.09.87-no-jre.zip
make-sqldeveloper-package: Building sqldeveloper package in "/home/skp/sqldeveloper".
dh: The --until option is deprecated. Use override targets instead.
dh: The --remaining option is deprecated. Use override targets instead.
dh_pysupport: This program is deprecated, you should use dh_python2 instead. Migration guide: http://deb.li/dhs2p
dh: The --before option is deprecated. Use override targets instead.
skp@chestnut:~/sqldeveloper$ ls
sqldeveloper_3.2.20.09.87+0.2.3-1_all.deb sqldeveloper-3.2.20.09.87-no-jre.zip

Finally, I could install it with dpkg:


skp@chestnut:~/sqldeveloper$ sudo dpkg -i sqldeveloper_3.2.20.09.87+0.2.3-1_all.deb
Selecting previously unselected package sqldeveloper.
(Reading database ... 389197 files and directories currently installed.)
Unpacking sqldeveloper (from sqldeveloper_3.2.20.09.87+0.2.3-1_all.deb) ...
Setting up sqldeveloper (3.2.20.09.87+0.2.3-1) ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...

In the end, it seems almost easier to me to just simply unzip it to a directory and use it!  I wonder how hard or if it is even possible to build a package the way the WebUp8 team did for Java.  That package downloads and installs Java at the same time.  I would love to see the same thing for SQL Developer.

Resources

Leave a Comment

Your email address will not be published.