Unable to install openssh-server on Ubuntu 22.04

Asked by Daniel Sebastian

Hi,

it seems like there are some dependencies issues when installing openssh-server on Ubuntu 22.04

See detailed error below. In short, installing the package with apt fails.

sudo apt install openssh-server

It states there might be held packages. Indeed, this system does not has any held packages ('apt-mark showhold' is empty). Also, I tried manually to install the packages, which apparently cannot be installed. All packages are well installed at their latest version:

apt is already the newest version (2.4.10).
init is already the newest version (1.62).
openssh-client is already the newest version (1:8.9p1-3ubuntu0.4)
shim-signed is already the newest version (1.51.3+15.7-0ubuntu1).
util-linux is already the newest version (2.37.2-4ubuntu3).

Full error:

sudo apt install openssh-server
Reading package lists... Done
Building dependency tree... Done
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.
 apt : Depends: libapt-pkg6.0 (>= 2.4.10) but it is not going to be installed
 init : PreDepends: systemd-sysv
 openssh-client:i386 : Depends: libgssapi-krb5-2:i386 (>= 1.17) but it is not installable
 shim-signed : Depends: grub-efi-amd64-signed (>= 1.187.2~) but it is not going to be installed or
                        grub-efi-arm64-signed (>= 1.187.2~) but it is not installable
               Depends: grub2-common (>= 2.04-1ubuntu24)
 util-linux : PreDepends: libudev1 (>= 183) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

System:
Ubuntu 22.04.3 LTS
65-bit
Gnomer version 42.8
windowing System: X11
AMD Ryzen processor

Any help would be appreciated.

Regards, Daniel

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel Sebastian
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

apt-cache policy apt libapt-pkg6.0 init systemd-sysv openssh-client libgssapi-krb5-2:i386

Revision history for this message
Daniel Sebastian (dsagred) said :
#2

Hi, thanks for getting back. It gives the following output:

apt-cache policy apt libapt-pkg6.0 init systemd-sysv openssh-client libgssapi-krb5-2:i386
apt:
  Installed: 2.4.10
  Candidate: 2.4.10
  Version table:
 *** 2.4.10 100
        100 /var/lib/dpkg/status
     2.4.5 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libapt-pkg6.0:
  Installed: 2.4.10
  Candidate: 2.4.10
  Version table:
 *** 2.4.10 100
        100 /var/lib/dpkg/status
     2.4.5 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
init:
  Installed: 1.62
  Candidate: 1.62
  Version table:
 *** 1.62 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
systemd-sysv:
  Installed: 249.11-0ubuntu3.10
  Candidate: 249.11-0ubuntu3.10
  Version table:
 *** 249.11-0ubuntu3.10 100
        100 /var/lib/dpkg/status
     249.11-0ubuntu3.7 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     249.11-0ubuntu3 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
openssh-client:
  Installed: 1:8.9p1-3ubuntu0.4
  Candidate: 1:8.9p1-3ubuntu0.4
  Version table:
 *** 1:8.9p1-3ubuntu0.4 100
        100 /var/lib/dpkg/status
     1:8.9p1-3ubuntu0.3 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     1:8.9p1-3 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libgssapi-krb5-2:i386:
  Installed: (none)
  Candidate: 1.19.2-2ubuntu0.1
  Version table:
     1.19.2-2ubuntu0.1 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages
     1.19.2-2 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main i386 Packages

Revision history for this message
Daniel Sebastian (dsagred) said :
#3

Thanks to this, I can trace it back to libgssapi-krb5-2:i386. If I run apt-cache policy libgssapi-krb5-2 it gives me:

libgssapi-krb5-2:
  Installed: 1.19.2-2ubuntu0.2
  Candidate: 1.19.2-2ubuntu0.2
  Version table:
 *** 1.19.2-2ubuntu0.2 100
        100 /var/lib/dpkg/status
     1.19.2-2ubuntu0.1 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     1.19.2-2 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

I am wondering why openssh-server askes for a 32bit package, as it is a 64bit system. Is there a way to correct for this? It I try to install libgssapi-krb5-2:i386, it will consequently refuse the 32bit installation:

sudo apt install libgssapi-krb5-2:i386

The following packages have unmet dependencies.
 apt : Depends: adduser but it is not going to be installed
 init : PreDepends: systemd-sysv
 login : PreDepends: libpam-runtime but it is not going to be installed
         PreDepends: libpam-modules but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Try:

sudo apt upgrade systemd-sysv

If that's OK then run:

sudo apt upgrade libpam-modules

Do both run OK?

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

For diagnostic purposes please provide the output that you receive for the following commands:

uname -a
lsb_release -crid
dpkg --print-architecture
dpkg --print-foreign-architectures

The important difference shown for libgssapi-krb5-2 vs. libgssapi-krb5-2:i386 is

libgssapi-krb5-2:i386:
  Installed: (none)
  Candidate: 1.19.2-2ubuntu0.1
  Version table:
     1.19.2-2ubuntu0.1 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages
     1.19.2-2 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main i386 Packages

libgssapi-krb5-2:
  Installed: 1.19.2-2ubuntu0.2
  Candidate: 1.19.2-2ubuntu0.2
  Version table:
 *** 1.19.2-2ubuntu0.2 100
        100 /var/lib/dpkg/status
     1.19.2-2ubuntu0.1 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     1.19.2-2 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

You have a version of libgssapi-krb5-2 installed, that is not available in one of the repositories that you have defined as allowed sources.

Have you removed jammy-updates from your list of repository sources?

Revision history for this message
Daniel Sebastian (dsagred) said :
#6

Hi, indeed, the update repository seems to be gone...

sudo grep -rhE ^deb /etc/apt/sources.list*
deb http://gb.archive.ubuntu.com/ubuntu/ jammy main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ jammy universe
deb http://gb.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
deb http://gb.archive.ubuntu.com/ubuntu/ jammy main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ jammy universe
deb http://gb.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse

I found the issue now:

In the software center(GUI), you can under 'updates' and 'subscribed to' select between 'all updates' and 'security updates only'. Setting the latter will remove the whole 'jammy-updates' repository AND also prevent the installation of the openssh-server package. This looks like a bug to me?

I changed this setting and the issue is solved!

Thank you all for your help figuring this out!

Cheers,
Daniel

Here is the output of the requested commands:

uname -a
Linux exo-reduc 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

dpkg --print-architecture
amd64

dpkg --print-foreign-architectures
i386

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

If the problem is solved, then please set the status of the question document to "solved", to avoid that other persons start working on it in an attempt to help you.

Revision history for this message
Daniel Sebastian (dsagred) said :
#8

Thanks.