broken synaptic package manager

Asked by Greg McKay

I have a package stuck in synaptic that wil not fully install or uninstall.Now I cant seem to do anything with any install or uninstall procedures including updates.I have used several command lines from different sources and the return from them are all variations on the same theme.I have included a typical eg of what I have been getting.
 sudo apt-get -f install
Password:
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B/1179kB of archives.
After unpacking 0B of additional disk space will be used.
(Reading database ... 86163 files and directories currently installed.)
Preparing to replace taskjuggler 2.2.0-1ubuntu1 (using .../taskjuggler_2.2.0-1ubuntu1_i386.deb) ...
Unpacking replacement taskjuggler ...
touch: missing file operand
Try `touch --help' for more information.
dpkg: warning - old post-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
touch: missing file operand
Try `touch --help' for more information.
dpkg: error processing /var/cache/apt/archives/taskjuggler_2.2.0-1ubuntu1_i386.deb (--unpack):
 subprocess new post-removal script returned error exit status 1
touch: missing file operand
Try `touch --help' for more information.
dpkg: error while cleaning up:
 subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/taskjuggler_2.2.0-1ubuntu1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried to get an answer in Ubuntu forums so far without success this is a link to the history of what has been tried http://ubuntuforums.org/showthread.php?t=404876&goto=newpost
I dont care if I cant install the package I just want synaptic etc working.I am a new user and having a few challenges moving away from windows especially using command lines.I have just moved from a duel boot system to soley running Dapper Drake so I need to learn sooner rather than later.Would greatly appreciate assistance with this and I must say I have been greatly impressed by the strength of your community and look forward to being competant enough to contribute something.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Greg McKay
Solved:
Last query:
Last reply:
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) said :
#1

try simply :

"sudo apt-get remove taskjuggler"

if it doesn't work, try :

"sudo dpkg -r --force-reinstreq taskjuggler"

Revision history for this message
Greg McKay (gkmckay) said :
#2

Tried both options without success ,answers were as follows
~$ sudo apt-get remove taskjuggler
Password:
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  taskjuggler
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 4321kB disk space will be freed.
Do you want to continue [Y/n]? Y
dpkg: error processing taskjuggler (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid
Aborted
greg@greg-laptop:~$ Errors were encountered while processing:
 taskjuggler
Next
 sudo dpkg -r --force-reinstreq taskjuggler
dpkg: unknown force/refuse option `reinstreq'
So thanks for the input and I am starting to find my way arround in dpkg help files in the terminal view and have experimented with a few options but no luck.Guess this is how you learn.Got any other suggestions?

Revision history for this message
Best Greg McKay (gkmckay) said :
#3

Have found a solution via Ubuntu forums.It appears the problem was the "taskjuggler" package and not synaptic.The advice I got was:

Dear grekei,

ramjet_1953 has just replied to a thread you have subscribed to entitled - broken synaptic package manager - in the Absolute Beginner Talk forum of Ubuntu Forums.

This thread is located at:
http://ubuntuforums.org/showthread.php?t=404876&goto=newpost

Here is the message that has just been posted:
***************
OK, it is obvious that taskjuggler is the problem and all of the above help was fruitless.

Open a console and type in the following:

Code:

sudo gedit /var/lib/dpkg/status

Search through the file for any reference to taskjuggler and CAREFULLY delete all of that entry.

Save the file

Code:

sudo apt-get update

Your problem should now be solved, as Synaptic can no longer see this errant package and as disk space is taken up, it will be over-written.

Regards,
Roger :cool:
Thanks again for all the support perhaps this info may assist someone else and I look forward to more adventures in the world of Ubuntu

Revision history for this message
chapper (gwdzn2) said :
#4

New to the forums so don't know how to start a new question/thread and don't really want to crap somebody's thread.
I have a similar problem to the one above. NOOB here, started Feisty only 3 days ago.
I was installing a lot of packages with Synaptic and it hung for an hour at least when It was installing EMIX I think. I Just gave up waiting and powered off, a no no I gather with Linux, since I couldn't click on anything to Quit.
Now when I try to open Synaptic I get the error "dpkg configure a". I do this & all goes well till I enter "aptitude" then I'm lost.
So I enter " sudo gedit /var/lib/dpkg/stus which of course brings up a list of 20million patches :) I do not have 6 weeks to go thru this so I give up on this.
Could someone PLEEZ help me solve this problem & get back into Synaptic?

Revision history for this message
Hoornet (hoornet) said :
#5

tnx man. Helped me too

Revision history for this message
Gloppie (gloppie) said :
#6

Fixed me too !!!!
http://ubuntuforums.org/showthread.php?t=92922&page=2 is resolved

THANKS !!

Revision history for this message
Ben West (mrgenixus) said :
#7

I got this in refrence to a borked flash install from adobe deb, solution:

sudo rm /var/lib/dpkg/info/adobe-flashplugin.prerm
sudo dpkg --remove --force-remove-reinstreq adobe-flashplugin

per: https://bugs.launchpad.net/ubuntu/+source/adobe-flashplugin/+bug/371890