Ubuntu: Error installing isc-dhcp-server


So I am trying to install isc-dhcp-server, but when I tried installing it, the following errors show. (sudo apt-get install isc-dhcp-server)

Reading package lists... Done  Building dependency tree  Reading state information... Done  isc-dhcp-server is already the newest version (4.3.3-5ubuntu12.7).  0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.  After this operation, 0 B of additional disk space will be used.  Do you want to continue? [Y/n]  Setting up isc-dhcp-server (4.3.3-5ubuntu12.7) ...  /sbin/restorecon: lstat(/var/lib/dhcpd/dhcpd.leases) failed: No such file or directory  dpkg: error processing package isc-dhcp-server (--configure):    subprocess installed post-installation script returned error exit status 255  Errors were encountered while processing:    isc-dhcp-server  E: Sub-process /usr/bin/dpkg returned an error code (1)  

I've tried purging it first (I am trying to reinstall it since I have an error of not connecting to upstart in DRBL). It was successfully removed but when I tried re-installing it, then that's when the errors showed up.

Tried also these commands:

sudo apt-get clean  sudo apt-get update  sudo apt-get upgrade  


sudo apt-get install isc-dhcp-server  


Okay, nevermind. I found my solution. I deleted all isc-dhcp-server files under /var/lib/dpkg/info/. Then re-install it again.

sudo rm /var/lib/dpkg/info/isc-dhcp-server*  sudo apt-get install isc-dhcp-server  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »