16

I'm trying to install odbcinst1debian2 on Ubuntu 20.04 but it appears there is a missing dependency, "multiarch-support":

$ sudo apt-get install odbcinst1debian2
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:
 odbcinst1debian2 : PreDepends: multiarch-support but it is not installable
E: Unable to correct problems, you have held broken packages.

Running sudo apt-get install -f afterwards doesn't resolve the issue.

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Since this package requires multiarch-support, I tried installing that directly, which didn't help either:

$ sudo apt-get install multiarch-support
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package multiarch-support is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'multiarch-support' has no installation candidate

How should this package and unixodbc-dev which depends upon it be installed?

$ sudo apt-get install unixodbc-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:
 unixodbc-dev : Depends: unixodbc (= 2.3.7)
                Depends: odbcinst1debian2 (= 2.3.7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Any help would be appreciated, thanks.


I had run apt-get update, it's the first thing I run on a new install.

$ sudo apt-get install odbcinst1debian2 
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.
[Stuff deleted] 
The following packages have unmet dependencies: odbcinst1debian2 : PreDepends: multiarch-support but it is not installable E: Unable to correct problems, you have held broken packages. 


$ lsb_release -a 
No LSB modules are available. 
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS 
Release: 20.04 Codename: focal

$ apt-cache policy odbcinst1debian2 
odbcinst1debian2: 
Installed: (none) 
Candidate: 2.3.7 
Version table: 
  2.3.7 500 
    500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages 
  2.3.6-0.1build1 500 
    500 http://hk.archive.ubuntu.com/ubuntu focal/main amd64 Packages 
5
  • Did you forgot to run sudo apt-get update? What is the output of lsb_release -a and apt-cache policy odbcinst1debian2?
    – N0rbert
    Apr 28, 2020 at 13:35
  • I had run apt-get update, it's the first thing I run on a new install. $ sudo apt-get install odbcinst1debian2 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. [Stuff deleted] The following packages have unmet dependencies: odbcinst1debian2 : PreDepends: multiarch-support but it is not installable E: Unable to correct problems, you have held broken packages. Apr 29, 2020 at 1:48
  • $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal Apr 29, 2020 at 1:48
  • $ apt-cache policy odbcinst1debian2 odbcinst1debian2: Installed: (none) Candidate: 2.3.7 Version table: 2.3.7 500 500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages 2.3.6-0.1build1 500 500 http://hk.archive.ubuntu.com/ubuntu focal/main amd64 Packages Apr 29, 2020 at 1:49
  • You can follow the below answer, optionally you have to decide about removing packages.microsoft.com repository from the system.
    – N0rbert
    Apr 29, 2020 at 8:07

3 Answers 3

16

This problems looks like you forgot to run sudo apt-get update before installing odbcinst1debian2. On focal this package does not depend on multiarch-support.


By the way multiarch-support may be installed manually:

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.4_amd64.deb
sudo apt-get install ./multiarch-support_2.27-3ubuntu1.4_amd64.deb
5
11

I had to sudo apt-get install unixodbc before adding Microsoft's source list, per here.

5

As explained in comments and other answers, the issue comes from Microsoft advertising a more recent version of the packages.

However you may keep the Microsoft repository and set up a policy for it with a lower priority in /etc/apt/preferences :

Package: *
Pin: origin "packages.microsoft.com"
Pin-Priority: 1

Then use apt-get update and retry upgrading.

2
  • That's a great answer, which solved the same issue for me.
    – Matthias
    Feb 14, 2023 at 10:27
  • Underrated answer. Fix my issue immediately.
    – Jaskier
    Feb 26, 2023 at 20:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .