[SOLVED] Package 'stuck' in Package Manager.

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
bobltx

[SOLVED] Package 'stuck' in Package Manager.

Post by bobltx »

Linux Mint 18.2 Sonya 64bit.

I have a package, hl1450lpr:i386, which is marked red in Package Manager for removal and it is preventing me from doing any updates. If I try to Unmark it immediately it goes back to red again. The Brother HL1450 printer on this machine is working as is the HP Deskjet 5550 so I don't really want to uninstall
anything. I have tried to remove it thus:

Code: Select all

bob@MainDesk ~ $ sudo apt-get remove hl1450lpr:i386
[sudo] password for bob: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  hl1450lpr:i386
0 to upgrade, 0 to newly install, 1 to remove and 83 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 812444 files and directories currently installed.)
Removing hl1450lpr:i386 (1.1.2-1) ...
/var/lib/dpkg/info/hl1450lpr.postrm: 3: /var/lib/dpkg/info/hl1450lpr.postrm: /etc/init.d/lpd: not found
dpkg: error processing package hl1450lpr:i386 (--remove):
 subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
 hl1450lpr:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)
Whenever I try to install anything with package manager I get the same error message " subprocess installed post-removal script returned error
exit status 127" and nothing is done.

I have tried to find "hl1450lpr:i386" using Midnight Commander but have come up with nothing. Is it trying to remove a package that doesn't exist?
Anyone got any ideas short of a complete re-install of the operating system? :cry:
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DAMIEN1307

Re: Package 'stuck' in Package Manager.

Post by DAMIEN1307 »

Try this first and see if it fixes things for you...DAMIEN

Code: Select all

sudo apt-get --fix-broken install 
Follow up with:

Code: Select all

sudo apt update
Then refresh your update manager and see if things are back to normal.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Package 'stuck' in Package Manager.

Post by Flemur »

If DAMIEN1307's advice doesn't work, try installing the package again, then uninstalling it.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
bobltx

Re: Package 'stuck' in Package Manager.

Post by bobltx »

Thanks Guys,

Tried that Damien but it didn't help, the problem is still there.
Then tried a re-install but just keep getting the same error message.
No matter what I try it is unchangeable, I have tried to find it with MC but it seemingly doesn't exist.
If I unplug the printer and then remove it from "Configure Printers" in the main menu do you think
that will solve the problem? Then plug it back in as a 'new' printer which will hopefully be recognized.

Sorry for the long delay in following this up but medical issues keep getting in the way :-)
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Package 'stuck' in Package Manager.

Post by ricardogroetaers »

go in:
Application Sources -> Maintenance
Click on:
- Fix update list issues (MergeList)
-Clean residual setting

Refresh the cache.

Image
bobltx

Re: Package 'stuck' in Package Manager.

Post by bobltx »

Thanks ricardogroetaers,
Tried your suggestion but when I update the cache I get this:

W: http://www.openprinting.org/download/pr ... elease.gpg: Signature by key F8897B6F00075648E248B7EC24CBF5474CFD1E2F uses weak digest algorithm (SHA1)

Followed by:
E: hl1450lpr: 0.0000:subprocess installed post-removal script returned error exit status 127

Then tried to do a software update but it failed with the same error message as before.

Looks like I'll have to back up all the data, not an easy job , then format the SSD and start again :(

Thanks for your input.
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Package 'stuck' in Package Manager.

Post by ricardogroetaers »

bobltx wrote: Thu Oct 31, 2019 4:30 am Looks like I'll have to back up all the data, not an easy job , then format the SSD and start again :(
Before taking this radical step, try:

Go to "Application Sources":
- Authentication Keys -> Remove All
- Additional repositories -> remove everything except "CD-ROM" (which should remain but unchecked).
- PPAs -> remove everything.

Go back to "Maintenance" and repeat the steps from the previous post.
bobltx

Re: Package 'stuck' in Package Manager.

Post by bobltx »

Thanks again ricardogroetaers ,

Done as you suggested but the problem is still there when I try to update the cache I get 'An error occurred' window;

E: hl1450lpr: 0.0000:subprocess installed post-removal script returned error exit status 127

And the 'Changes applied' window shows;

Code: Select all

(Reading database ... 812444 files and directories currently installed.)
Removing hl1450lpr:i386 (1.1.2-1) ...
/var/lib/dpkg/info/hl1450lpr.postrm: 3: /var/lib/dpkg/info/hl1450lpr.postrm: /etc/init.d/lpd: not found
dpkg: error processing package hl1450lpr:i386 (--remove):
 subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
 hl1450lpr:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Package 'stuck' in Package Manager.

Post by ricardogroetaers »

Open synaptic.
-> settings -> preferences -> go to files tab
Click the "delete cache package files" button
Click the apply button
click the ok button
close synaptic
open synaptic
wait for "search index update" to finish.
bobltx

Re: Package 'stuck' in Package Manager.

Post by bobltx »

Thanks Ricardo, tried that, clicked on the apply button but when I try to close synaptic I get the message:

"Quit and discard marked changes"

It seems that nothing has happened because this error message is shown again when I click on the apply icon
at the top of synaptic;

E: hl1450lpr: 0.0000:subprocess installed post-removal script returned error exit status 127

This error is blocking everything else from happening.
gm10

Re: Package 'stuck' in Package Manager.

Post by gm10 »

You can fix your immediate problem with this:

Code: Select all

sudo rm -v /var/lib/dpkg/info/hl1450lpr.postrm
However, I'll note that I do not understand your premise, you say you do not want to uninstall anything and then proceed to show how you are trying to uninstall something:
bobltx wrote: Fri Oct 18, 2019 8:53 am I have a package, hl1450lpr:i386, which is marked red in Package Manager for removal and it is preventing me from doing any updates. If I try to Unmark it immediately it goes back to red again. The Brother HL1450 printer on this machine is working as is the HP Deskjet 5550 so I don't really want to uninstall
anything. I have tried to remove it thus:
Shouldn't you have asked how not to remove it? Anyway, what's done is done I guess, you can always reinstall it should it end up being needed.
bobltx

Re: Package 'stuck' in Package Manager.

Post by bobltx »

gm10 you're a genius :-)

Problem now solved thanks to you.
What I didn't want to uninstall were the printer 'drivers' having had some hassle getting both printers up and running. The offending 'hl1450lpr:i386' was marked for removal and highlighted in red in synaptic but would not go whatever we tried, and no updates could be installed.

Just done an update and everything listed downloaded and installed OK, I now might do an OS update. Also both printers are still working fine so it was a not needed file.

Thank you all very much for you help.
gm10

Re: Package 'stuck' in Package Manager.

Post by gm10 »

I may well be, but in this case I may just have been the only one who actually read the error message you received, I'm not sure that alone qualifies me. :lol:

Anyway, happy to help. ;) :mrgreen:
Locked

Return to “Software & Applications”