1

I face the following situation on one machine with 64bit Mint 17.3 Cinnamon:

$ sudo apt-get install openssh-server

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  openssh-client:i386 openssh-sftp-server
Suggested packages:
  ssh-askpass:i386 libpam-ssh:i386 keychain:i386 monkeysphere:i386 rssh
  molly-guard monkeysphere
Recommended packages:
  ncurses-term ssh-import-id
The following packages will be REMOVED:
  openssh-client
The following NEW packages will be installed:
  openssh-client:i386 openssh-server openssh-sftp-server
0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
Need to get 928 kB of archives.
After this operation, 1 418 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

I don't understand why it wants to remove the 64bit openssh-client and install 32bit instead.

/etc/apt/sources.list

#deb cdrom:[Linux Mint 17.3 _Rosa_ - Release amd64 20151115]/ trusty contrib main non-free

/etc/apt/sources.list.d folder contains many PPAs:

doublecmd.list
esmska.list
getdeb.list
google-chrome.list
graphics-drivers-ppa-trusty.list
inkscape_dev-stable-trusty.list
mono-xamarin.list
nijel-phpmyadmin-trusty.list
n-muench-programs-ppa2-trusty.list
official-package-repositories.list
official-source-repositories.list
ondrej-php-trusty.list
otto-kesselgulasch-gimp-trusty.list
playonlinux.list
spideroakone.list
spotify.list
steam.list
strukturag-libde265-trusty.list
ubuntu-sdk-team-ppa-trusty.list
ubuntu-touch-coreapps-drivers-daily-trusty.list
unit193-encryption-trusty.list
videolan-master-daily-trusty.list
virtualbox.list
wfg-0ad-trusty.list
wine.list

apt-get update

Reading package lists... Done  

I can see no errors.

apt-get -o Debug::pkgProblemResolver=true install openssh-server

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following extra packages will be installed:
  openssh-client:i386 openssh-sftp-server
Suggested packages:
  ssh-askpass:i386 libpam-ssh:i386 keychain:i386 monkeysphere:i386 rssh
  molly-guard monkeysphere
Recommended packages:
  ncurses-term ssh-import-id
The following packages will be REMOVED:
  openssh-client
The following NEW packages will be installed:
  openssh-client:i386 openssh-server openssh-sftp-server
0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
Need to get 928 kB of archives.
After this operation, 1,418 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort. 

apt-cache policy openssh-client openssh-server

openssh-client:
  Installed: 1:6.6p1-2ubuntu2.6
  Candidate: 1:6.6p1-2ubuntu2.6
  Version table:
 *** 1:6.6p1-2ubuntu2.6 0
        100 /var/lib/dpkg/status
     1:6.6p1-2ubuntu2.4 0
        500 http://archive.ubuntu.mirror.dkm.cz/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1:6.6p1-2ubuntu1 0
        500 http://archive.ubuntu.mirror.dkm.cz/ trusty/main amd64 Packages
openssh-server:
  Installed: (none)
  Candidate: 1:6.6p1-2ubuntu2.4
  Version table:
     1:6.6p1-2ubuntu2.4 0
        500 http://archive.ubuntu.mirror.dkm.cz/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1:6.6p1-2ubuntu1 0
        500 http://archive.ubuntu.mirror.dkm.cz/ trusty/main amd64 Packages
  • please show us the contents of /etc/apt/sources.list – schaiba Mar 27 '16 at 8:44
  • Run apt-get update and make sure it completes with no errors or complaints. You can also run this command in debugging mode, which may yield more info. Namely apt-get -o Debug::pkgProblemResolver=true install openssh-server. Also show the output ofapt-cache policy openssh-client openssh-server. – Faheem Mitha Mar 27 '16 at 8:48
  • @schaiba ok, there you have it – LinuxSecurityFreak Mar 27 '16 at 8:51
  • It wants to install the i386 version of openssh-client, so I think you have done something weird with multip-arch support. In addition to what the previous two comments mention could you run (and show us the output) of apt-get -f install. – Henrik Mar 27 '16 at 8:51
  • @FaheemMitha ok, there you have it – LinuxSecurityFreak Mar 27 '16 at 9:08
4

Per your apt-cache policyoutput, you have openssh-client 1:6.6p1-2ubuntu2.6 installed, but this doesn't correspond to any url, and the version number is not the same as the server version number. The Debian ssh packages require the client and server versions to match exactly.

So, it's clear why apt wants to remove the amd64 version of openssh-client you have installed. What is less clear is why it is trying to install the i386 version of openssh-client.

So, just do

apt-get purge openssh-client

And then install both openssh-client and openssh-server.

apt-get install openssh-client openssh-server

PS: Explanation from Julian Andres Klode on #debian-apt.

juliank> faheem: It would have to downgrade the amd64 version, which is forbidden. But the :i386 one is apparently allowed to satisfy dependencies on other architectures (Multi-Arch: foreign), so it can install that instead.

Satisfying dependencies on other archs seems a bit wacky, but I suppose an i386 client might work with a amd64 server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.