Ubuntu – why apt-get cannot install any application

aptitudedpkgUbuntu

when trying to install application using apt-get, I always get

/bin/sh: /usr/sbin/dpkg-preconfigure: not found

for example:

$sudo apt-get install libssl-dev  
[sudo] password for camino:   
Reading package lists... Done  
Building dependency tree         
Reading state information... Done  
 ....

Do you want to continue [Y/n]? y  
WARNING: The following packages cannot be authenticated!  
  libssl-dev libssl0.9.8  
Install these packages without verification [y/N]? y  


/bin/sh: /usr/sbin/dpkg-preconfigure: not found  
Setting up debconf (1.5.35+maemo3+0m6) ...  
exec: 19: /usr/share/debconf/frontend: not found  
dpkg: error processing debconf (--configure):    
 subprocess installed post-installation script returned error exit status 2  
Errors were encountered while processing:  
 debconf  


$sudo dpkg-reconfigure libssl-dev  
sudo: unable to execute /usr/sbin/dpkg-reconfigure: No such file or directory  

$ls /usr/sbin/dpkg-reconfigure  
/usr/sbin/dpkg-reconfigure  

$which dpkg-reconfigure  
/usr/sbin/dpkg-reconfigure  

$dpkg-reconfigure  
bash: /usr/sbin/dpkg-reconfigure: /usr/bin/perl.real: bad interpreter: No such file or directory

Any suggestions?

Best Answer

Your system is so broken that I will recommend a fresh installation.

Rationale: If these very broken things are just the tip of the iceberg then this system will give you a LOT of problems in time to come. Get it in a known state - the easiest way to do so is with a fresh install.

(and then don't do the things you did, again).

Related Question