Problems with apt

Asked by Lawrence Robinson

I have been trying to install a cups driver for my Lexmark z600 printer. I followed instructions for converting the *.rpm package I located at " www.linuxprinting.org" to a *.deb package, and everything seemed to work just fine - until I tried installing the .deb package. That aborted as unsuccessful and I now have problems with the Synaptic Package Manager.

When I try to load Synaptic or the Update Manager I get the following error message:

"E: The package z600cups needs to be reinstalled, but I can't find an archive for it.
 E: Internal error opening cache (1). Please report."

I am unable to use either. Please help!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
chantra
Solved:
Last query:
Last reply:
Revision history for this message
chantra (chantra) said :
#1

Try this: go to Applications->Accessories->Terminal and type
$ sudo apt-get -f install

Synaptic might get fixed after this.

Revision history for this message
Lawrence Robinson (lrobby25) said :
#2

This did not help. I got the following message:
E: The package z600cups needs to be reinstalled, but I can't find an archive for it.

This is keeping me in a never ending circle since the z600cups is faulty.

Revision history for this message
Cesare Tirabassi (norsetto) said :
#3

How did you try to install the *.deb and why was it unsuccesful?

Revision history for this message
chantra (chantra) said :
#4

to force the package to be uninstalled do this in a terminal:
1 . verify that dpkg is aware of z600cups
$ sudo dpkg --get-selections z600cups

2. If you have a result, back it up and make dpkg believe it is uninstalled:
$ sudo dpkg --get-selections z600cups > backup_z600.txt
$ echo "z600cups deinstall" > uninstall_z600.txt
$ sudo dpkg --set-selections < uninstall_z600.txt

If it does not change anything, revert to your previous config with:
$ sudo dpkg --set-selections < backup_z600.txt

hope this helps.

Revision history for this message
Lawrence Robinson (lrobby25) said :
#5

This is a copy of Terminal when I followed these instructions:

ray@DeskNote:~$ sudo dpkg --get-selections z600cups
Password:
z600cups install
ray@DeskNote:~$ sudo dpkg --get-selections z600cups > backup_z600.txt
ray@DeskNote:~$ echo "z600cups deinstall" > uninstall_z600.txt
ray@DeskNote:~$ sudo dpkg --set-selections < uninstall_z600.tx
bash: uninstall_z600.tx: No such file or directory
ray@DeskNote:~$ sudo dpkg --set-selections < backup_z600.txt
ray@DeskNote:~$

And Synaptic still will not load.

Revision history for this message
chantra (chantra) said :
#6

Sorry, there where a typo.

sudo dpkg --set-selections < uninstall_z600.tx
should read
sudo dpkg --set-selections < uninstall_z600.txt

then try synaptics

If it still fail then:
sudo dpkg --set-selections < backup_z600.txt

----

http://www.debuntu.org

Debuntu deb's repository

Debuntu Debian and Ubuntu Tips and Tricks

Revision history for this message
Lawrence Robinson (lrobby25) said :
#7

Cesare,

I tried installing the package with the command:

sudo dpkg -i z600cups_1.0-2*.deb

Following is a transcript of Terminal:

ray@DeskNote:~$ sudo dpkg -i z600cups_1.0-2*.deb
(Reading database ... 115814 files and directories currently installed.)
Preparing to replace z600cups 1.0-2 (using z600cups_1.0-2_i386.deb) ...
Unpacking replacement z600cups ...
/var/lib/dpkg/info/z600cups.postrm: 2: /etc/init.d/cups: not found
dpkg: warning - old post-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/postrm: 2: /etc/init.d/cups: not found
dpkg: error processing z600cups_1.0-2_i386.deb (--install):
 subprocess new post-removal script returned error exit status 127
/var/lib/dpkg/tmp.ci/postrm: 2: /etc/init.d/cups: not found
dpkg: error while cleaning up:
 subprocess post-removal script returned error exit status 127
Errors were encountered while processing:
 z600cups_1.0-2_i386.deb

This has put me in this position.

Revision history for this message
Best chantra (chantra) said :
#8

> /var/lib/dpkg/tmp.ci/postrm: 2: /etc/init.d/cups: not found
> dpkg: error processing z600cups_1.0-2_i386.deb (--install):

try :
$ sudo cp /etc/init.d/cupsys /etc/init.d/cups
$ sudo dpkg -i z600cups_1.0-2*.deb

----

http://www.debuntu.org

Debuntu deb's repository

Debuntu Debian and Ubuntu Tips and Tricks

Revision history for this message
Lawrence Robinson (lrobby25) said :
#9

Thanks to everyone for helping. I am now back to normal with the cups installed.

Revision history for this message
chantra (chantra) said :
#10

Nice to hear that you are sorted out :D

----

http://www.debuntu.org

Debuntu deb's repository

Debuntu Debian and Ubuntu Tips and Tricks

Revision history for this message
BobK (bob-abbamania) said :
#11

I cannot understand as why is it so hard to remove z600 from my kubuntu system, I have tried everything and read a whole heap of different ways and still nothing.
I am now unable to install printers, or do my updates because of one corrupt printer driver.
I am a newbie and I suppose there might be a way I can re- install kubuntu without losing all my configs?

Revision history for this message
BobK (bob-abbamania) said :
#12

This is what I get when I try to remove it:

root@kubuntu:~# apt-get remove z600
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package z600cups needs to be reinstalled, but I can't find an archive for it.

Revision history for this message
chantra (chantra) said :
#13

E: The package z600cups needs to be reinstalled, but I can't find an archive for it.

As it says: the package z600cups needs to be reinstalled, but apt cannot do it because it is not available in the repositories.
So, first step would be to find z600cups .deb package somewhere and to reinstall it with
dpkg -i z600cupsxxxxxxxx.deb

Revision history for this message
BobK (bob-abbamania) said :
#14

Thanks Chantra,
I had to first do: cp /etc/init.d/cupsys /etc/init.d/cups
and then reinstall the package and all is now back to normal.
Thanks again.
Bob K