Score:1

Cannot upgrade Ubuntu due to unmet dependencies: unixodbc : Depends: odbcinst1debian2 (>= 2.3.11) but it is not installed

ws flag

Starting yesterday, I cannot upgrade my Ubuntu installation. When running sudo apt-get upgrade I got an error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 unixodbc : Depends: odbcinst1debian2 (>= 2.3.11) but it is not installed
            Depends: libodbc1 (>= 2.3.11) but it is not installed
 unixodbc-dev : Depends: odbcinst1debian2 (= 2.3.11) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Running sudo apt --fix-broken install gave me an error.

Installing those packages manually with sudo apt-get install -y libodbc1 was not helpful.

According to this it could be related to Microsoft SQL server, that I was investigating for testing purposes but quite a time ago. Using solutions from here was not helpful (same error).

The output of sudo apt update:

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://fr.archive.ubuntu.com/ubuntu jammy InRelease                                                                                                                     
Hit:3 http://fr.archive.ubuntu.com/ubuntu jammy-updates InRelease                                                                                                                   
Hit:4 http://packages.microsoft.com/repos/code stable InRelease                                                                                                                     
Hit:5 http://fr.archive.ubuntu.com/ubuntu jammy-backports InRelease                                                                     
Get:6 https://packages.microsoft.com/ubuntu/20.04/mssql-server-preview focal InRelease [7 383 B]                                        
Hit:7 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease                                                  
Get:8 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]        
Hit:9 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease                   
Hit:10 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu jammy InRelease
Hit:11 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu jammy InRelease
Fetched 118 kB in 1s (94,7 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
19 packages can be upgraded. Run 'apt list --upgradable' to see them.

I have Ubuntu 22.04.2 LTS.

pl flag
There's a lot of issues in one question. Can we please focus on just one specific issue per question? (I could probably have helped fix the odbc issue, but if you've wiped the system, that's unfix-able now, and largely irrelevant to this question).
makkreker avatar
ws flag
Hello, thank you for your response. My Ubuntu is working now, I did not wipe it. I probably can delete the part about system reinstallation
user535733 avatar
cn flag
Please edit your question to show us the complete output of `sudo apt update`
pl flag
If you run `sudo apt full-upgrade` (rather than `upgrade`) does the update complete?
makkreker avatar
ws flag
1. added `sudo apt update` output 2. `sudo apt full-upgrade` gives the same error as `sudo apt-get upgrade`
pl flag
What happens if you `sudo apt install unixodbc odbcinst1debian2 libodbc1 unixodbc-dev` - i.e. manually force installing? Any additional messages?
pl flag
Oh, just notcied you're running 22.04 and the Microsoft PPA only supports 20.04. You may want to remove that PPA.
makkreker avatar
ws flag
I launched the installation of the all packages mentioned and removed Microsoft PPA from Software&Updates. Still, I see the same error (`sudo apt install unixodbc odbcinst1debian2 libodbc1 unixodbc-dev` or `sudo apt-get upgrade` )
user535733 avatar
cn flag
`unixodbc` binaries are in the 'universe' pocket of the Ubuntu repositories, which --according to your apt output-- is not enabled.
makkreker avatar
ws flag
I've just checked Software&Updates and universe pocket (and all others, except source code) is available
Graeme avatar
bn flag
@makreker, how did you fix this? I have the same problem. I am running mssql server (just development version) on Ubuntu 22.04, so it could be related to that.
makkreker avatar
ws flag
I decided to reinstall the system in the end and downgrade to 20.04 Thank you everyone for a help.
makkreker avatar
ws flag
@Graeme this was not the only issue with 22.04 https://stackoverflow.com/questions/75401930/deploying-application-via-api-with-docker-docker-lib-x86-64-linux-gnu-libc-so
Score:0
jp flag

I had the same issue, microsoft odbc repos were causing it.

  • I removed/commented from sources list all references to microsoft repos ( a bit overkill but one can add again one repo at a time when the sytem is updated and upgraded. The culprit for me was the mssql-server repo )
  • sudo apt update
  • then I removed all packages using ms odbc : sudo apt-get remove unixodbc msodbcsql17 msodbcsql18 unixodbc-dev mssql-tools mssql-tools18
  • sudo apt update & sudo apt upgrade

Obviously this solution is ok for those like me who don't use ms odbc anymore ( didn't manage to make it work though ). If you have to keep ms odbc clean and updated, good luck.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.