I need to install the library iodbc (depends on libodbc2) in my Quantal machine. Yet there is creepy dependency problem. This was replaced somehow by unixodbc which I don't have, installed. Here is what I get when I try to install :
sudo apt-get install libiodbc2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libiodbc2-dev : Depends: libiodbc2 (= 3.52.7-2build2) but it is not going to be installed
Depends: iodbc (= 3.52.7-2build2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I can tell that iodbc conflicts with odbcinst. Yet, I cannot remove it due to the following:
sudo apt-get remove odbcinst
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
akonadi-backend-mysql calligra-l10n-engb kde-l10n-engb kdevelop-l10n kdevelop-php-docs-l10n kdevelop-php-l10n libakonadi-kabc4 libakonadi-notes4
libakonadiprotocolinternals1 libboost-thread1.49.0 libdmtx0a libgpgme++2 libkcalcore4 libkdgantt2 libkholidays4 libkimap4 libkldap4 libkmbox4 libkmime4
libkolabxml0 libkpgp4 libkresources4 libksieve4 libprison0 libqgpgme1 libqrencode3 libxerces-c3.1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
akonadi-server k3b k3b-i18n katepart kde-runtime kdelibs-bin kdelibs5-plugins kdepim-runtime kdepim-strigi-plugins kdepimlibs-kio-plugins kdoctools kget kmag
kmail kmix kmousetool ksystemlog kubuntu-debug-installer language-pack-kde-ar language-pack-kde-en libakonadi-calendar4 libakonadi-contact4 libakonadi-kcal4
libakonadi-kde4 libakonadi-kmime4 libcalendarsupport4 libincidenceeditorsng4 libk3b6 libkabc4 libkactivities-bin libkactivities6 libkalarmcal2
libkatepartinterfaces4 libkcal4 libkcalutils4 libkcddb4 libkde3support4 libkdepim4 libkdepimdbusinterfaces4 libkdewebkit5 libkemoticons4 libkfile4 libkgapi0
libkhtml5 libkio5 libkleo4 libkmanagesieve4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkolab0 libkonq-common libkonq5abi1 libkontactinterface4
libkparts4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libksieveui4 libktexteditor4 libktnef4 libktorrent4 libkworkspace4abi2
libkxmlrpcclient4 libmailcommon4 libmailimporter4 libmailtransport4 libmessagecomposer4 libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4
libnepomuk4 libnepomukcore4abi1 libnepomukquery4a libnepomuksync4 libnepomukutils4 libplasma3 libsoprano4 libtemplateparser4 libvirtodbc0 nepomuk-core odbcinst
odbcinst1debian2 plasma-scriptengine-javascript qapt-batch soprano-daemon virtuoso-minimal
0 upgraded, 0 newly installed, 89 to remove and 0 not upgraded.
After this operation, 126 MB disk space will be freed.
Do you want to continue [Y/n]?
Other info: Why do the "iodbc" and "libmyodbc" packages conflict with each other?
The root problem is that I need to use a new feature introduced in the latest MySQL Workbench builds (DB Migration) which uses odbc for that matter. Here is what Mysql doc says about it :
Linux
The Migration Wizard uses iODBC as a driver manager for all of its ODBC connections in Linux. This may give you some troubles because most Linux distributions provide ODBC drivers compiled against unixODBC. This is another driver manager not supported by MySQL Workbench so you won’t be able to use those drivers unless you compile them against iODBC. Here’s what you should do.
Make sure that you have iODBC installed. If you are using Debian, Ubuntu or another Debian based distro, type this command in your terminal:
$> sudo apt-get install iodbc libiodbc2-dev libpq-dev libssl-dev
For RPM based distros (RedHat, Fedora, etc.) type this command instead of the previous one:
$> sudo yum install iodbc iodbc-dev libpqxx-devel openssl-devel
Now we need to install the PostgreSQL ODBC drivers.
Download the psqlODBC source tarball from here. Use the latest version available for download. As of this writing the latest version corresponds to the file psqlodbc-09.01.0200.tar.gz. Extract this tarball to a directory in your hard drive and open a terminal and cd into that directory.
Type this in the terminal window:
$> ./configure --with-iodbc --enable-pthreads $> make $> sudo make install
Verify that you have the file psqlodbcw.so in the /usr/local/lib directory.
This package seems to pose the problem probably:
dpkg -s odbcinst1debian2
Package: odbcinst1debian2
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 241
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: unixodbc
Version: 2.2.14p2-5ubuntu4
Replaces: unixodbc (<< 2.1.1-2)
Depends: libc6 (>= 2.14), libltdl7 (>= 2.4.2), odbcinst
Pre-Depends: multiarch-support
Breaks: libiodbc2, libmyodbc (<< 5.1.6-2), odbc-postgresql (<< 1:09.00.0310-1.1), tdsodbc (<< 0.82-8)
Conflicts: odbcinst1, odbcinst1debian1
Description: Support library for accessing odbc ini files
This package contains the libodbcinst library from unixodbc, a library
used by ODBC drivers for reading their configuration settings from
/etc/odbc.ini and ~/.odbc.ini.
.
Also contained in this package are the driver setup plugins, which
describe the features supported by individual ODBC drivers.
Homepage: http://www.unixodbc.org/
Original-Maintainer: Steve Langasek <[email protected]>
I have no broken packages:
Some Linux distributions (Debian, Ubuntu, Gentoo) have their own packages for iODBC, so you should only need to type a command such as one of
to install it, and possibly some dependencies (GTK+ libraries for the adminstrator utility), automatically.
Refer : http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/IODBCRubyHOWTO#Linux