Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Here's the problem. I tried to install a .deb for an epson scanner (http://download.ebz.epson.net/dsc/search/01/search/searchModule) and did accidentally installed the i386 instead of the amd64 version.

Now I get the following issue. The same issue crops up if I try to uninstall or purge using dpkg too!

sudo apt-get autoremove
[sudo] password for ***: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 iscan-plugin-gt-x770 : Depends: iscan (>= 2.16.1) but it is not installable
 iscan-plugin-gt-x820 : Depends: iscan (>= 2.22.0) but it is not installable
E: Unmet dependencies. Try using -f.
➜  ~  sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
... libreoffice-java-common...linux-image-extra-3.11.0-13-generic linux-image-extra-3.11.0-14-generic
  linux-image-extra-3.11.0-15-generic lp-solve openjdk-7-jre-lib swig swig2.0
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  iscan-plugin-gt-x770 iscan-plugin-gt-x820
0 upgraded, 0 newly installed, 2 to remove and 3 not upgraded.
After this operation, 926 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 693386 files and directories currently installed.)
Removing iscan-plugin-gt-x770 ...
/var/lib/dpkg/info/iscan-plugin-gt-x770.prerm: 4: /var/lib/dpkg/info/iscan-plugin-gt-x770.prerm: iscan-registry: not found
dpkg: error processing iscan-plugin-gt-x770 (--remove):
 subprocess installed pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/iscan-plugin-gt-x770.postinst: 4: /var/lib/dpkg/info/iscan-plugin-gt-x770.postinst: iscan-    registry: not found
Removing iscan-plugin-gt-x820 ...
/var/lib/dpkg/info/iscan-plugin-gt-x820.prerm: 4: /var/lib/dpkg/info/iscan-plugin-    gt-x820.prerm: iscan-registry: not found
dpkg: error processing iscan-plugin-gt-x820 (--remove):
subprocess installed pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/iscan-plugin-gt-x820.postinst: 4: /var/lib/dpkg/info/iscan-plugin-gt-x820.postinst: iscan-    registry: not found

Errors were encountered while processing:
 iscan-plugin-gt-x770
 iscan-plugin-gt-x820
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
    
possible duplicate of How do I resolve unmet dependencies? –  i08in Feb 27 at 6:05
    
@Jobin nope. He tried those, not working. –  Braiam Feb 27 at 13:48
    
What is the output of sudo apt-get check? And apt-cache policy iscan iscan-plugin-gt-x770 iscan-plugin-gt-x820. –  Braiam Feb 27 at 13:49

1 Answer 1

up vote 2 down vote accepted

Try:

echo | sudo tee /var/lib/dpkg/info/iscan-plugin-gt-x770.prerm
echo | sudo tee /var/lib/dpkg/info/iscan-plugin-gt-x820.prerm

And then:

sudo apt-get install -f

The above commands will empty the pre removing scripts on the packages and therefore will make the uninstaller finish correctly.

share|improve this answer
    
That worked. Thank you. –  mh00h Feb 28 at 7:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.