LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 03-11-2009, 04:03 PM   #1
AncientPC
LQ Newbie
 
Registered: Apr 2007
Posts: 25
Thanked: 0
dpkg can't remove a package, dependency problems


[Log in to get rid of this advertisement]
When installing a package (hugs) through apt-get my laptop had a kernel panic and I had to do a hard reset. Upon starting up, I ran fsck all the partitions (jfs) and rebooted into Ubuntu.

However hugs was unconfigured and can't be installed / removed. I tried an apt-get purge and dpkg --configure -a / dpkg --remove -f hugs but the error message in all cases is:
Code:
root@core:/var/lib/aptitude# dpkg --remove hugs
(Reading database ... 161721 files and directories currently installed.)
Removing hugs ...
dpkg (subprocess): unable to execute pre-removal script: Exec format error
dpkg: error processing hugs (--remove):
 subprocess pre-removal script returned error exit status 2
dpkg (subprocess): unable to execute post-installation script: Exec format error
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 hugs
How do I get around the pre-removal script and force dpkg to remove hugs?
AncientPC is offline  
Tag This Post , , , , ,
Reply With Quote
Old 03-11-2009, 04:18 PM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: Debian Lenny / Squeeze / Sid
Posts: 7,213
Blog Entries: 5
Thanked: 246
Did you try forcing a reinstall over top of the package ?

apt-get -f install
or
apt-get -f install hugs

other options are listed here:
http://www.linux.com/feature/48910

If you get it to complete the installation you should then be able to remove it.
farslayer is offline     Reply With Quote
Old 03-11-2009, 06:45 PM   #3
AncientPC
LQ Newbie
 
Registered: Apr 2007
Posts: 25
Thanked: 0

Original Poster
Well I'm having trouble installing/removing it either way, but forcing the install doesn't work. One of the dependency libraries was corrupt so I cleared all the cached packages and reran the command. Now the error is "dpkg: unable to execute post-install script: Exec format error"

Code:
root@core:~# aptitude install -f hugs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following partially installed packages will be configured:
  hugs 
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up hugs (98.200609.21-5) ...
dpkg (subprocess): unable to execute post-installation script: Exec format error
dpkg: error processing hugs (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 hugs
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
AncientPC is offline     Reply With Quote
Old 03-11-2009, 08:32 PM   #4
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: Debian Lenny / Squeeze / Sid
Posts: 7,213
Blog Entries: 5
Thanked: 246
Did you look at the link I provided ? it has other options as well for working past these issues..



You should have posted this thread in the Debian forum, it might have got more exposure that way to some of the more advance Debian users, who might not notice the post here.. just for future reference.
farslayer is offline     Reply With Quote
Old 03-12-2009, 01:40 AM   #5
AncientPC
LQ Newbie
 
Registered: Apr 2007
Posts: 25
Thanked: 0

Original Poster
Yes, the link was very helpful and informative. However despite trying all the suggestions I still cannot install / remove the hugs package. It doesn't help that there are no other versions to force a downgrade (but even then the remove script would probably crap out).
AncientPC is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dpkg dependency problems recif Debian 2 08-05-2008 07:28 AM
dpkg dependency issue tdemers Linux - Software 2 02-11-2007 12:54 AM
Confused on how to remove a deb package with dpkg dr_zayus69 Debian 5 06-04-2006 03:02 PM
apt-get dependency problems with alternative package Frits of waterplant Debian 3 06-01-2005 05:45 PM
dpkg dependency problems gandhi Debian 3 03-19-2005 03:50 PM


All times are GMT -5. The time now is 01:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration