openssh-server falha de instalação no Ubuntu 16.04

0

Eu fico abaixo dos erros. Você pode por favor ajudar?

ashwini@ubuntu:~$ 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)
    
por Ashwini Madhava Gaikwad 31.07.2016 / 13:42

1 resposta

2

A instalação do bloqueio de erros está na saída que você citou:

cannot create /etc/ssh/sshd_config: Directory nonexistent

Tente criar o diretório antes de instalar:

$ sudo mkdir /etc/ssh
    
por user4556274 31.07.2016 / 13:49