Package Installation error and solution
Sponsored Link
E: The package webmin needs to be reinstalled, but I can't find an archive for it.
E: The package mfc8500lpr needs to be reinstalled, but I can't find an archive for it.
This error might be with any package in the above examples webmin and mfc8500lpr packages this error mostly occour when you try to install a debian package in to ubuntu system
Error
E: The package package name needs to be reinstalled, but I can't find an archive for it.
Package name in the above error could be any package
Solution
Run the following command
For webmin Pakage
dpkg --remove --force-remove-reinstreq webmin
You can replace webmin to any of your package name which is giving the error
I’m having a simimlar problem, but with a different package.
All the solutions so far don’t work, apt-get remains broken so I can’t install or uninstall anything.
This is what happens:
dpkg –remove –force-remove-reinstreq virtualbox
dpkg – warning, overriding problem because –force enabled:
Package is in a very bad inconsistent state – you should
reinstall it before attempting a removal.
(Reading database … 109242 files and directories currently installed.)
Removing virtualbox …
(Kernel module not found)…fail!
invoke-rc.d: initscript virtualbox, action “stop” failed.
dpkg: error processing virtualbox (–remove):
subprocess pre-removal script returned error exit status 1
-e
Creating group ‘vboxusers’. VM users must be member of that group!
No precompiled module for this kernel found — trying to build one
Messages displayed during module compilation will be logged to /var/log/vbox-install.log
Compilation of kernel module failed, aborting installation
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
virtualbox
———-
And that’s it. Without the –force-remove-reinstreq option it also doesn’t work.
Any clues? I don’t want to reinstall the whole of Ubuntu again if at all possible.
Edit/Delete Message
Yes, I’m at exactly the same point with virtualbox. I installed VirtualBox_1.3.2_Ubuntu_Dapper_x86.deb from a downloaded file with dpkg -i, just as described in the VirtualBox User Manual. It worked fine for a while. Then I installed a new version of the linux kernel and (silly me) decided to install the latest VirtualBox_1.3.4_Ubuntu_dapper_i386.deb WITHOUT making a new 1.3.2 kernel module…. boom!
Now I’m hopelessly stuck – can’t go forward, back or even sideways. If hantms found the answer, please let me know asap.
OK, I’ve fixed it! The process is quite long and specific to VirtualBox.
1. delete all files beginning with virtualbox in /var/lib/dpkg/info/
2. sudo dpkg –remove –force-depends –force-remove-reinstreq virtualbox
Then, follow the instructions in the VirtualBox FAQ as follows….
3. edit /etc/init.d/virtualbox and change line 129 exit 1 to zero (after the kernel module failure detection).
4. reinstall with sudo dpkg -i VirtualBox_blah.deb – expect it to fail in postinstall.
5. edit /var/lib/dpkg/info/virtualbox.postinst line 39 exit 1 to zero.
6. resume the failed install with sudo dpkg –configure –pending (this will also fail because it still can’t build the kernel module).
At this stage, you can breath a sigh of relief after synaptic starts successfully! search for virtualbox and you will find it installed OK. Also, dpkg –status virtualbox is reassuringly clean.
7. use synaptic to install the linux-headers-xxx package that matches your running kernel.
Follow the VirtualBox User Manual to build the correct kernel module….
8. cd /opt/VirtualBox-blah/src/ ; sudo make; sudo make install. (phew!)
9. sudo /etc/init.d/virtualbox start works fine.
Hope that helps someone.
Awesome. Exactly what I was looking for, worked in an instant. Thanks for posting this ๐
this way solved my problem with virtualbox
Run the following command
For webmin Pakage
dpkg –remove –force-remove-reinstreq webmin
dpkg –remove –force-remove-reinstreq webmin
it worked also perfectly for me! Thanks a lot!
Hey thanks That solved my prb
Finally !!!!
Having a similar problem with another package. Of course every piece of advise failed until I saw Brians Step 1 above. Seems the key was to delete the files in the /var/lib/dpkg/info/ directory related to your installation (in my case MFC665*). Once done with that THEN run the following:
sudo dpkg –remove –force-depends –force-remove-reinstreq mfc665cwcupswrapper
Without this first step the above command always failed. Now by removing the files dpkg finds no files, assumes the install was removed and updates (in my case) Adept.
Thanks Brian… 2 days of searching…. finally resolved.
This is truly the best x-mas present so far!
I had the same problem that Finally had (darn those stupid brother mfc) and now it seems resolved!
Hugs and kisses to admin, Brian Burch and Finally for this article!
Thank you so much for this guide!
My Christmas was also saved. ๐
Wish it worked for me ๐
I tried to install the NDAS drivers and admin tools for the networkable NDAS hard drives — my first mistake, as they are not supported, and written for debain – a few people did get it to work under ubuntu — but not me ๐ Running 7.10 Gutsy, can not do any apt-gets or install any packages.Really hate the idea of reinstalling over one failed package. Here is the output I am getting when using the above method.
dpkg – warning, overriding problem because –force enabled:
Package is in a very bad inconsistent state – you should reinstall it before attempting a removal.
(reading database … 134678 files and directories currently installed.)
removing ndas-admin …
/etc/init.d/ndas: 38: Syntax error: Bad substitution
dpkg: error processing ndas-admin (–remove):
subprocess pre-removal script returned error exit status 2
System startup links for /etc/init.d/ndas already exist.
/etc/init.d/ndas: 38: Syntax error: Bad substitution
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
ndas-admin
I looked in the /var/lib/dpkg/info/ directory and didn’t see anything that belonged to ndas-admin (nothing with that name anyways)…
I’m kind of at a lose, so if anyone has any ideas please let me know thanks.
Well, after looking and searching, and not finding anything — I sat down and was thinking….and decided that I would deleted the /etc/init.d/ndas file that was giving the errors — I reran dpkg with the force enabled, and just as I thought, /etc/init.d/ndas file came back!!! Which made me think, that there had to be some ndas-admin files someplace on the hard drive –
I did a locate ndas* and came up with a long list –
I then deleted (sudo rm) the files I felt were causing problems — mainly the INSTALL and make files…
reran dpkg with the force remove — got a couple of weird errors, but it did solve the problem, and now I am able to install the updates, — over 100 at this point!! Oh Well, better then having to wipeout my system and start over…
I guess the point to this post is — if You get ERRORS when you try to remove the failed package — do a locate and see if you can find anything that might look as if it belongs to the failed package — remove that and then run dpkg.
(THen again, I could have broken my system even worse if I was wrong….so use at your own risk)
Thanks for the help thou.
Thanks so much, Finally. I’m working with an eeepc 8g, and I had the same problem with a brother printer driver. Using the information here, I was able to delete the files in the /var/lib/dpkg/info/ folder and get everything working again. Before fixing, couldn’t update any software with the builtin utility. THANKS AGAIN!
Hit this problem with Google Earth. The above solution (dpkg –remove –force-remove-reinstreq) cleared it right up. Thanks.
Hi,
Thanks a ton for your support/solution.
This works fine me after removing the files from /var/lib/dpkg/info/ with dpkg โremove โforce-depends โforce-remove-reinstreq option.
Thanks you very much again and keep a good work going on.
Regds,
Sera
Many thanks. I’ve recovered apt-get a few times, this time required the removal of the files /var/lib/dpkg/info before the dpkg –remove –force-remove-reinstreq webmin which had me stumped! Can’t print any more from linux but at least OS works
i need telnet ubuntu server package 8.04.1 .
Thank you Thank you Thank you (bow grovel and worship) Saved me from having to wipe system after botched NI488.2 driver install
Worked for me! Thanks a lot hantms!
I tried to install a package that was already installed. Not sure why this would be a big issue but….The suggested command didn’t work for me instead, since I know the package was installed correctly I used gedit to open /var/dpkg/status, did a search for the package and just changed the appropriate spot from ‘Status: (whatever the error message was)’ to ‘Status: install ok installed’. All was fine, but as I said I knew for a fact that this package was correctly isntalled.
I tried the suggested command in a Terminal window, but it said only a system administrator can perform this operation. (I’m quite new at Linux, I installed Ubuntu today, so far I like it…) I have only one user account on the system, and I don’t know how can I log on as a system administrator.
The problematic package is ‘hl1650lpr’ which is a Brother printer driver.
Any help would be appreciated.
Thx
OK, I found out how I do it as a system administrator. So I tiped
sudo dpkg –remove –force-remove-reinstreq hl1650lpr
The problem is the following:
1. It says I should reinstall the package before I could uninstall it. But if I try to reinstall hl1650lpr[…].deb package it says I can’t install it, because the package is either corrupted or I don’t have the right permissions. So I am stucked at this point.
2. Right after the terminal orders me to reinstall the package it countinues with the operation and results this:
/var/lib/dpkg/info/hl1650lpr.postrm: 3: /etc/init.d/lpd: not found
post-removal script exits with error code 127 (translated from Hungarian)
So I really don’t know what to do, and this problem is really annoying, since I can’t use any package manager application: niether Synaptic nor Add/Remove works any more…
Hello Peter,
Did you find a solution to this issue.I have exactly the same problem…
cheers
Rengifo
Hi Renginfo Ortega,
Unfortunately I couldn’t find any working solutions for this problem. I had to reinstall the entire system. I read through several forums, including the Hungarian and English Ubuntu forums, but nowhere could I find a solution.
If you have a Brother printer, I recommend you to install it via System -> Administration -> Printer. After reinstalling Ubuntu I could install my Brother HL-1030 laser printer that way and it works fine.
Hope I could help.
Al the bests,
Peter
Thanks for you reply Peter… I guess i will have to do the same. Even when it sucks !
Best regards
I had a circle of postrm script errors from
trying to remove the brother brhl2070n driver.
My mistake was installing it with dpkg when I
had removed cups and lprng and lpd previously
with apt.
The solution, after following the procedure
already prescribed, was to go to /etc/init.d/ and
remove lprng and lpd startup scripts. The error
was nothing more than a failure to restart
something that was not running and could not
be restarted. Just installed lprng with no
problem. I am using debian on an old BP6 system so I can’t afford a hog like CUPS.
Regards, and thanks, daveA
Almost forgot ๐
I’m going to try my luck with dpkg-dev and a
/usr/local/debian repository. Hopefully, that
will keep me out of trouble in the future.
(cross fingers). Regards, daveA
Thanks a lot for this post! Saved me a headache!
Saved me too. Used the method in Finally’s post. Thanks!
thank you Brian Burch.