openssh-server install failure on ubuntu 16.04

I get below errors. Can you please help?

[email protected]:~$ sudo apt-get install ssh [sudo] password for ashwini:  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages were automatically installed and are no longer required:   libpango1.0-0 libpangox-1.0-0 Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed:   ssh 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. 1 not fully installed or removed. Need to get 0 B/7,072 B of archives. After this operation, 99.3 kB of additional disk space will be used. Selecting previously unselected package ssh. (Reading database ... 191087 files and directories currently installed.) Preparing to unpack .../ssh_1%3a7.2p2-4ubuntu1_all.deb ... Unpacking ssh (1:7.2p2-4ubuntu1) ... Setting up openssh-server (1:7.2p2-4ubuntu1) ... /var/lib/dpkg/info/openssh-server.postinst: 164: /var/lib/dpkg/info/openssh-server.postinst: cannot create /etc/ssh/sshd_config: Directory nonexistent dpkg: error processing package openssh-server (--configure):  subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of ssh:  ssh depends on openssh-server (>= 1:7.2p2-4ubuntu1); however:   Package openssh-server is not configured yet.  dpkg: error processing package ssh (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                           Errors were encountered while processing:  openssh-server  ssh E: Sub-process /usr/bin/dpkg returned an error code (1) 

Replay

The error blocking install is in the output you quoted:

cannot create /etc/ssh/sshd_config: Directory nonexistent

Try creating the directory prior to install:

$ sudo mkdir /etc/ssh

Category: package management Time: 2016-07-31 Views: 2

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.222 (s). 12 q(s)