2

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?

3
  • What the heck did you do to get your system into this state? There are protections against uninstalling core system packages.
    – ephemient
    Oct 27 '10 at 3:20
  • sorry,I cannot remember whether I have deleted something or not
    – camino
    Oct 27 '10 at 6:18
  • @Camino Please do not add the solution into your question. Write a separate answer or add it as a comment to the answer you marked as the correct one.
    – Jan Doggen
    Sep 4 '14 at 9:23
0

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).

2
  • If somebody knowledgeable had direct access to the machine in question, they might be able to wget and ar and tar (or maybe dpkg-deb still works, who knows) the system back into a usable state, but over SU… the easiest thing to do is almost certainly reinstall.
    – ephemient
    Oct 27 '10 at 22:42
  • @ephemient - how would you determine when you are done fixing things? Oct 28 '10 at 6:41
2

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

perl.real? What the heck? Something or someone has modified your /usr/sbin/dpkg-reconfigure to contain a wrong path to Perl.

Edit the /usr/sbin/dpkg-reconfigure with your favourite text editor and sudo, for example sudo nano -w /usr/sbin/dpkg-reconfigure and change the beginning of the file from

#!/usr/bin/perl.real -w

to

#!/usr/bin/perl -w

2
  • thank you!,the perl issue has been fixed,but the apt-get still can not work
    – camino
    Oct 27 '10 at 7:25
  • ... and in what way it fails? Please update your original question and be more verbose. Oct 27 '10 at 7:56
2

i resolved this using sudo apt install --reinstall po-debconf et voilà, after that command i can install new programms

(Ubuntu 14.04 32bit - running on Eee PC 1000HE)

1

I suspect their may be something wrong with apt or dpkg-config or possible your bash session.

Try running this because it probably can't hurt

sudo su -      (this lets you become root and uses its settings)

apt-get update && sudo apt-get update && sudo aptitude full-upgrade

exit           (get out of root)

The two apt-get updates are intentional. If there is a problem with one, the second run may fix the first run. You can also replace full-upgrade with safe-upgrade if you don't want to clean unused packages.

1
  • I tried this, and got an error: sudo: aptitude: command not found Jan 30 '17 at 21:49
0

Unless you only messed up your PATH variable, you may have somehow deleted an important program.

-What does your $PATH variable say? -Have you deleted any directories since apt-get has last worked?

1
  • $echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr
    – camino
    Oct 27 '10 at 6:15
0

try sudo aptitude remove -> sudo aptitude update --> and then try to intall again sudo aptitude install libssl-dev and sudo dpkg-reconfigure libssl-dev

1
  • $sudo dpkg-reconfigure libssl-dev sudo: unable to execute /usr/sbin/dpkg-reconfigure: No such file or directory but in fact /usr/sbin/dpkg-reconfigure do exist $ls /usr/sbin/dpkg-reconfigure /usr/sbin/dpkg-reconfigure
    – camino
    Oct 27 '10 at 6:17
0

Thanks all .

the issue has been fixed ,

I use dpkg to show info about debconf

$dpkg -l |grep debconf

ri  debconf        1.5.35+maemo3+0m6               Debian configuration management system  
ii  debconf-i18n   1.5.35+maemo3+0m6       full internationalization support for debcon   
ii  po-debconf     1.0.16                      tool for managing templates file translation  
ii  ssl-cert       1.0.23ubuntu2             simple debconf wrapper for OpenSSL  

it is very strange that debconf is maemo , so I copy debconf and frontend from other's ubuntu machine,
it works now!
but dpkg -l still show it was maemo.

Thanks

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.