package openssh-server 1:7.2p2-4ubuntu2.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I was trying to install openssh server and I got following error
$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ncurses-term openssh-sftp-server ssh-import-id
Suggested packages:
ssh-askpass rssh molly-guard monkeysphere
The following NEW packages will be installed:
ncurses-term openssh-server openssh-sftp-server ssh-import-id
0 upgraded, 4 newly installed, 0 to remove and 290 not upgraded.
Need to get 636 kB of archives.
After this operation, 5,145 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Fetched 636 kB in 3s (161 kB/s)
Preconfiguring packages ...
Selecting previously unselected package ncurses-term.
(Reading database ... 227909 files and directories currently installed.)
Preparing to unpack .../ncurses-
Unpacking ncurses-term (6.0+20160213-
Selecting previously unselected package openssh-
Preparing to unpack .../openssh-
Unpacking openssh-sftp-server (1:7.2p2-
Selecting previously unselected package openssh-server.
Preparing to unpack .../openssh-
Unpacking openssh-server (1:7.2p2-
Selecting previously unselected package ssh-import-id.
Preparing to unpack .../ssh-
Unpacking ssh-import-id (5.5-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Setting up ncurses-term (6.0+20160213-
Setting up openssh-sftp-server (1:7.2p2-
Setting up openssh-server (1:7.2p2-
Creating SSH2 RSA key; this may take some time ...
2048 SHA256:
Creating SSH2 DSA key; this may take some time ...
1024 SHA256:
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ssh, action "start" failed.
dpkg: error processing package openssh-server (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up ssh-import-id (5.5-0ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
openssh-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: openssh-server 1:7.2p2-4ubuntu2.1
ProcVersionSign
Uname: Linux 4.4.0-34-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Fri Sep 9 19:38:56 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2016-07-21 (50 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
RelatedPackageV
dpkg 1.18.4ubuntu1.1
apt 1.2.10ubuntu1
SourcePackage: openssh
Title: package openssh-server 1:7.2p2-4ubuntu2.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
Thank you for taking the time to report this bug and helping to make Ubuntu better.
From the log:
Sep 09 19:38:56 hostname sshd[11183]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Sep 09 19:38:56 hostname sshd[11183]: error: Bind to port 22 on :: failed: Address already in use.
Sep 09 19:38:56 hostname sshd[11183]: fatal: Cannot bind any address.
Sep 09 19:38:56 hostname systemd[1]: Failed to start OpenBSD Secure Shell server.
Sep 09 19:38:56 hostname systemd[1]: ssh.service: Failed with result 'exit-code'.
Sep 09 19:39:32 hostname sshd[11683]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Sep 09 19:39:32 hostname sshd[11683]: error: Bind to port 22 on :: failed: Address already in use.
Sep 09 19:39:32 hostname sshd[11683]: fatal: Cannot bind any address.
Sep 09 19:39:32 hostname systemd[1]: Failed to start OpenBSD Secure Shell server.
Sep 09 19:39:32 hostname systemd[1]: ssh.service: Failed with result 'exit-code'.
It seems you already have some other ssh server (or something else on that port) running.
Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.
If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http:// www.ubuntu. com/support/ community
Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http:// www.chiark. greenend. org.uk/ ~sgtatham/ bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.