Wednesday, July 20, 2016

OpenSSH – libwrap error on Ubuntu 12.04

When we try to install anything using sudo apt-get install ... we may get dependency errors. 

when I'm trying install OpenSSH Server on my machine , I got few dependency error. 

Error details:
sudo apt-get install openssh-server reading package lists... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable or been moved out of Incoming. distribution that some required packages have not yet been created The following information may help to resolve the situation: The following packages have unmet dependencies: openssh-server : Depends: libwrap0 (>= 7.6-4~) but it is not installable Recommends: ssh-import-id but it is not installable E: Unable to correct problems, you have held broken packages.
Snap shot of error message:

Steps to resolve: 
  1. sudo apt-get update
  2. sudo apt-get install -f
  3. sudo rm -rf /var/lib/apt/lists/*
  4. sudo apt-get update
Attaching snapshots of each step for better understanding. 
 1. apt-get update (Sudo is not required when you logged in as root)
You may see Hash mismatch Errors. 

 2. apt-get install -f
 3. rm -rf /var/lib/apt/lists/*
 4. apt-get update


Once Done, Install openssh Package.  

4. apt-get install openssh-server

5. To check the status of ssh server 

/etc/init.d/ssh sttus


service ssh status