1

When I install openssh-server with apt-get install on my ubuntu 18.04.2 LTS server an error occures when kpgk processes the package. The server is a cloud machine with 1 VCPU, 2 GB RAM, 20 GB Disk (4 GB still available).

dpkg --print-architecture: amd64

dpkg --print-foreign-architectures: i386

name -a: Linux [computer-name] 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Here is the exact command and full output:

apt-get install:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages werde automatically installed and are no longer required:
  linux-image-4.15.0-42-generic linux-modules-4.15.0-42-generic
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed
After this operatoin, 0 B of additional disk space will be used.
Setting up openssh-server (1:7.6p1-4ubuntu0.3) ...
/var/lib/dpgk/info/openssh-server.postinst: 95: /var/lib/dpkg/info/openssh-server.postinst: tempfile: Exec format error
dpkg: error processing package openssh-server (--configure): 
  installed openssh-server package post-installation script subprocess returned error exit status 2
Errors were encountered while processing: 
  openssh-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

The dpkg status of the package is now "install ok half-configured"

Maintainer is Ubuntu Developers

can someone give me a push in the right direction on how to solve this?`

Thanks

cw24
  • 111
  • 5
  • The full output and exact command you ran might be more helpful than just this excerpt. Also maybe check dpkg --print-architecture, dpkg --print-foreign-architectures and uname -a to see if the architectures you have configured in dpkg match those your system can use. – Byte Commander May 25 '19 at 16:37
  • Thanks for the input. I haved added the additional information to the original question. – cw24 May 26 '19 at 12:14
  • 2
  • 1
    Okay, so this postinst script makes a call to the tempfile command, which is provided by the debianutils package. Maybe that executable got corrupted somehow, so please first remove the half-installed ssh server again with sudo apt purge openssh-server, then try sudo apt install --reinstall debianutils, and then try to install the ssh server again. – Byte Commander May 26 '19 at 12:57
  • Thanks very much for the advice. I did a combination of Byte Commander's and Kulfy's solution and after reinstalling dpkg, openssh-server could be Status: install ok installed Yeah! I can now access the server from a ssh-client. New problem though, although the password has not been changed I get an "access denied", hmm.... – cw24 May 26 '19 at 14:28
  • Ok just succeeded in logging in. After the new install of openssh-server root access was prohibited, which is good and with a normal user ssh was acceessable. :-) – cw24 May 26 '19 at 15:03

0 Answers0