Ubuntu – Installing sqldeveloper – dependency problems: sqldeveloper depends on libc6-amd64 (>= 2.2.5)

aliendpkgglibcsoftware installationsqldeveloper

dpkg: dependency problems prevent configuration of sqldeveloper: sqldeveloper depends on libc6-amd64 (>= 2.2.5).

dpkg: error processing package sqldeveloper (--install):dependency problems - leaving unconfigured
Errors were encountered while processing: sqldeveloper

sudo apt-cache policy libc6-amd64

libc6-amd64:i386:
  Installed: 2.19-0ubuntu6.6
  Candidate: 2.19-0ubuntu6.6
  Version table:
 *** 2.19-0ubuntu6.6 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
        100 /var/lib/dpkg/status
     2.19-0ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

uname -a

Linux Inspiron-3537 3.19.0-28-generic #30~14.04.1-Ubuntu SMP Tue Sep 1 09:32:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

sudo apt-get remove -s libc6-amd64:i386

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  lib64gcc1:i386 lib64stdc++6:i386 libc6-amd64:i386
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Remv lib64stdc++6:i386 [4.8.4-2ubuntu1~14.04]
Remv lib64gcc1:i386 [1:4.9.1-0ubuntu1]
Remv libc6-amd64:i386 [2.19-0ubuntu6.6]

sudo apt-get remove libc6-amd64:i386
sudo dpkg -i sqldeveloper_4.1.1.19.59-2_all.deb

/WorkSpace/DataBase$ sudo dpkg --install sqldeveloper_4.1.1.19.59-2_all.deb 
Selecting previously unselected package sqldeveloper.
(Reading database ... 260675 files and directories currently installed.)
Preparing to unpack sqldeveloper_4.1.1.19.59-2_all.deb ...
Unpacking sqldeveloper (4.1.1.19.59-2) ...
dpkg: dependency problems prevent configuration of sqldeveloper:
 sqldeveloper depends on libc6-amd64 (>= 2.2.5).

dpkg: error processing package sqldeveloper (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 sqldeveloper

sudo apt-cache policy libc6

libc6:
  Installed: 2.19-0ubuntu6.6
  Candidate: 2.19-0ubuntu6.6
  Version table:
 *** 2.19-0ubuntu6.6 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.19-0ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

cat DEBIAN/control

Package: sqldeveloper
Version: 4.1.1.19.59-2
Architecture: all
Maintainer: Ankit Chaudhary <anki@Inspiron-3537>
Installed-Size: 393765
Depends: libc6-amd64 (>= 2.2.5), libc6-i386 (>= 2.1.3)
Section: alien
Priority: extra
Description: Oracle SQL Developer
 Oracle SQL Developer is a new, free graphical tool that enhances productivity and simplifies database development tasks. With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, as well as create and save your own.
 .
 (Converted from a rpm package by alien version 8.90.)

Best Answer

I suspect you have used alien, e.g.

sudo alien --script sqldeveloper-4.1.1.19.59-1.noarch.rpm

to create a deb package. Unfortunately, the created package can not be installed in your system because the package libc6-amd64 isn't available for Trusty in the needed version.

Repair your installation via

sudo apt-get purge sqldeveloper
sudo apt-get install -f

The interesting thing though is, in my case, that the generated DEB package has no dependence on libc6-amd64. But in your case... ok

Therefore start the command below. Copy and paste the whole block into a terminal and press Enter

mkdir deb$$; \
cp sqldeveloper_4.1.1.19.59-2_all.deb deb$$; \
cd deb$$; dpkg-deb -x sqldeveloper_4.1.1.19.59-2_all.deb deb; \
cd deb; \
dpkg-deb -e ../sqldeveloper_4.1.1.19.59-2_all.deb

Now start

cat DEBIAN/control

and you should see something like this

Package: sqldeveloper
Version: 4.1.1.19.59-2
Architecture: all
Maintainer: root <root@sturm>
Installed-Size: 393753
Depends: libc6 (>= 2.2.5), libc6-i386 (>= 2.1.3)
Section: alien
Priority: extra
Description: Oracle SQL Developer
 Oracle SQL Developer is a new, free graphical tool that enhances productivity and simplifies database development tasks. With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug P$
 .
 (Converted from a rpm package by alien version 8.93.)

but not in your case. o_O

Therefore start the commands below to correct this and re-build the package

sed -i 's/libc6-amd64/libc6/' DEBIAN/control
cd ..
sudo dpkg-deb -b deb

Finally install with

sudo dpkg -i deb.deb

and that's all ;)


Make the first start please from the terminal, in my case had to be answered there a question.

sqldeveloper

You will see

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

Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/aboettger/.sqldeveloper/4.1.0/product.conf

And I have used

/usr/lib/jvm/java-8-oracle