Microsoft MSSQL Repo: libodbc1 upgrade attempts to overwrite shared library

Bug #2007288 reported by Kafui Odzangba Dake
72
This bug affects 17 people
Affects Status Importance Assigned to Milestone
unixodbc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Upgrading libodbc1 fails with the following error below. I can probably get past this with dpkg -i --force-overwrite but it seems risky.

The following packages will be upgraded:
  libodbc1 odbcinst odbcinst1debian2
3 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/607 kB of archives.
After this operation, 836 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 447418 files and directories currently installed.)
Preparing to unpack .../libodbc1_2.3.11_amd64.deb ...
Unpacking libodbc1:amd64 (2.3.11) over (2.3.9-5) ...
dpkg: error processing archive /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0', which is also in package libodbc2:amd64 2.3.9-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../odbcinst1debian2_2.3.11_amd64.deb ...
Unpacking odbcinst1debian2:amd64 (2.3.11) over (2.3.9-5) ...
dpkg: error processing archive /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0', which is also in package libodbcinst2:amd64 2.3.9-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../odbcinst_2.3.11_amd64.deb ...
Unpacking odbcinst (2.3.11) over (2.3.9-5) ...
dpkg: error processing archive /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb (--unpack):
 trying to overwrite '/etc/odbc.ini', which is also in package unixodbc-common 2.3.9-5
Errors were encountered while processing:
 /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb
 /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb
 /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Information about my system:

$ apt policy libodbc1
libodbc1:
  Installed: 2.3.9-5
  Candidate: 2.3.11
  Version table:
     2.3.11 500
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
 *** 2.3.9-5 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     2.3.7 500
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages

$ apt policy odbcinst
odbcinst:
  Installed: 2.3.9-5
  Candidate: 2.3.11
  Version table:
     2.3.11 500
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
 *** 2.3.9-5 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.3.7 500
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages

$ apt policy odbcinst1debian2
odbcinst1debian2:
  Installed: 2.3.9-5
  Candidate: 2.3.11
  Version table:
     2.3.11 500
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
 *** 2.3.9-5 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.3.7 500
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages

$ lsb_release -rd
Description: KDE neon 5.27
Release: 22.04

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unixodbc (Ubuntu):
status: New → Confirmed
Revision history for this message
Jigisha Shah (jigishashah) wrote (last edit ):

Pls. fix this bug as high priority it broke our all repo using ubuntu 22.4 having
apt-get install -y msodbcsql17 unixodbc-dev

dpkg: error processing archive
/tmp/apt-dpkg-install-nQ0ixM/12-odbcinst_2.3.11_amd64.deb (--unpack):

dpkg: error processing archive /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0', which is also in package libodbc2:amd64 2.3.9-5

Revision history for this message
Sean Reifschneider (linsomniac) wrote (last edit ):

**NOTE** This is not a bug in Ubuntu, it is a bug in Microsoft's package repo for msodbcsql17.

Within the past 24 hours we have noticed this issue, and the repo at https://packages.microsoft.com/ubuntu/22.04/prod has started including the following package files:

- libodbc1_2.3.11_amd64.deb
- odbcinst1debian2_2.3.11_amd64.deb
- odbcinst_2.3.11_amd64.deb
- unixodbc-dev_2.3.11_amd64.deb
- unixodbc_2.3.11_amd64.deb

Where previously it only included the msodbcsql17_17.10.2.1-1_amd64.deb and mssql-tools_17.10.1.1-1_amd64.deb files.

Until Microsoft fixes this, you will need to:

- Uninstall all the packages listed above: apt remove unixodbc unixodbc-dev odbcinst odbcinst1debian2 libodbc1 msodbcsql17 mssql-tools
- Remove the Microsoft repo from your system (probably files in /etc/apt/sources.list.d or /etc/apt/sources.list), you probably want to comment the line out here.
- Remove cached deb files under /var/cache: find /var/cache -name \*.deb -exec rm {} +
- apt update
- Re-install the packages mentioned above except for the microsoft packages: apt install unixodbc unixodbc-dev odbcinst odbcinst1debian2 libodbc1
- Re-enable the Microsoft repo.
- apt update
- Install the microsoft packages: apt install mssql-tools

**DO NOT "apt upgrade" AFTER THIS POINT** or Set all the above packages to "hold" if you do an update.

In my case, I'm doing the following package installs and the holding them with: `apt-mark hold odbcinst1debian2 odbc-postgresql python3-pyodbc libodbc1 unixodbc unixodbc-dev odbcinst odbcinst1debian2`

summary: - libodbc1 upgrade attempts to overwrite shared library
+ Microsoft MSSQL Repo: libodbc1 upgrade attempts to overwrite shared
+ library
wstcsw (wstcsw)
information type: Public → Public Security
information type: Public Security → Public
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Chris (mephman) wrote :

This bug affects github actions so everyone there will have problems....

Revision history for this message
Sean Reifschneider (linsomniac) wrote :

@mephman: I presume the actions you are speaking about are your own actions that involve the Microsoft package repo I mention above? Or are there other github projects that have actions that are impacted?

Revision history for this message
objeck (objeck) wrote :

Ditto, I can not use GitHub actions with 22.04 as the environment is rebuilt and updated with each push. I might be able to jump through hoops to get it working but refactoring my CI scripts to workaround bugs is not feasible. I will remain on 20.04 until this issue is resolved.

Revision history for this message
Chris (mephman) wrote :

Sorry, yes. I use ubuntu-latest for my builds...I see the comment above to try 20. trying that now. It is my own action but I just apt install qemu and it fails.

Revision history for this message
Paride Legovini (paride) wrote :

As others noted this is an issue with third party packages/repositories, and not a bug in Ubuntu. In any case looks like it got fixed on the GitHub Actions side:

https://github.com/microsoft/linux-package-repositories/issues/39

Revision history for this message
Paride Legovini (paride) wrote :

Marking this as Fix Released even if technically it would be Invalid.

Changed in unixodbc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.