2

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.

QwertyChouskie
  • 2,344
  • 1
  • 16
  • 30
  • 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). – popey Feb 20 '23 at 00:02
  • 1
    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 – makkreker Feb 20 '23 at 00:05
  • Please edit your question to show us the complete output of sudo apt update – user535733 Feb 20 '23 at 00:11
  • If you run sudo apt full-upgrade (rather than upgrade) does the update complete? – popey Feb 20 '23 at 00:15
  • added sudo apt update output

  • sudo apt full-upgrade gives the same error as sudo apt-get upgrade

  • – makkreker Feb 20 '23 at 00:18
  • What happens if you sudo apt install unixodbc odbcinst1debian2 libodbc1 unixodbc-dev - i.e. manually force installing? Any additional messages? – popey Feb 20 '23 at 01:01
  • Oh, just notcied you're running 22.04 and the Microsoft PPA only supports 20.04. You may want to remove that PPA. – popey Feb 20 '23 at 01:02
  • 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 ) – makkreker Feb 20 '23 at 01:12
  • unixodbc binaries are in the 'universe' pocket of the Ubuntu repositories, which --according to your apt output-- is not enabled. – user535733 Feb 20 '23 at 01:13
  • I've just checked Software&Updates and universe pocket (and all others, except source code) is available – makkreker Feb 20 '23 at 01:16
  • @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. – Graeme Feb 21 '23 at 12:54
  • I decided to reinstall the system in the end and downgrade to 20.04 Thank you everyone for a help. – makkreker Feb 21 '23 at 23:36
  • @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 – makkreker Feb 22 '23 at 12:53