2

Using Ubuntu 12.04 LTS 64bit. Host is offline, and of necessity must stay that way.

I need to install odbc to talk with a remote database from a C++ application running on the system.

I have downloaded all packages required by "libmyodbc", and transferred them to the system:

mysql-common_5.5.44-0ubuntu0.12.04.1_all.deb   '
libmysqlclient18_5.5.44-0ubuntu0.12.04.1_amd64.deb
libodbc1_2.2.14p2-5ubuntu3_amd64.deb
odbcinst1debian2_2.2.14p2-5ubuntu3_amd64.deb
odbcinst_2.2.14p2-5ubuntu3_amd64.deb
libmyodbc_5.1.10-1_amd64.deb'

I am installing using dpkg -i, but get a conflict when trying to install obcinst*.deb and odbcinst1debian2*.deb:

Selecting previously unselected package odbcinst.
(Reading database ... 203584 files and directories currently installed.)
Unpacking odbcinst (from odbcinst_2.2.14p2-5ubuntu3_amd64.deb) ...
dpkg: dependency problems prevent configuration of odbcinst:
odbcinst depends on odbcinst1debian2 (>= 2.2.14p2); however:
Package odbcinst1debian2 is not configured yet.

So odbcinst can't install because odbcinst1debian2 is not installed. So I try to install odbcinst1debian2, and get:

Selecting previously unselected package odbcinst1debian2.
(Reading database ... 203563 files and directories currently installed.)
Unpacking odbcinst1debian2 (from odbcinst1debian2_2.2.14p2-5ubuntu3_amd64.deb) ...
dpkg: dependency problems prevent configuration of odbcinst1debian2:
odbcinst1debian2 depends on odbcinst; however:
Package odbcinst is not installed.

So odbcinst1debian2 can't install because odbcinst is not installed... I checked out the ubuntu site, and it shows that these libs depend on each other... http://packages.ubuntu.com/precise/odbcinst

Also, I found this discussion from Steve Langasek (creator of the odbc packaged) on this circular dependency, from 2009: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=545861

Steve states that "dpkg knows what to do with them"... but it doesn't seem to be able to resolve this issue.

Does anyone know how to install packages via 'dpkg' that depend on each other?

Is there a better way to do this (i.e. should I be using unixodbc instead)?

1 Answers1

5

Install both deb packages at the same time.

Go into the download folder of odbcinst1debian2_2.2.14p2-5ubuntu3_amd64.deb and odbcinst_2.2.14p2-5ubuntu3_amd64.deb and install via

sudo dpkg -i odbcinst*

or via

sudo dpkg -i odbcinst1debian2_2.2.14p2-5ubuntu3_amd64.deb odbcinst_2.2.14p2-5ubuntu3_amd64.deb

Or change the dependencies in one of deb files as described here.

A.B.
  • 92,125