Cannot install or remove flashplugin

Bug #365392 reported by OlaJi
68
This bug affects 15 people
Affects Status Importance Assigned to Milestone
flashplugin-nonfree (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: synaptic

I install the flashplugin-installer in synaptic but the flashplugin doesn't show up in Firefox. I try to reinstall flashplugi-installer but no luck. I install flashplugin-nonfree but no flashplugin show up in Firefox. I try to completely remove flshplugin-nonfree and flashplugin-installer. flashplugin-nonfree removes but flashplugin-installer. I get the following error:

ola@minifix:~$ sudo apt-get -f purge flashplugin-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  flashplugin-installer*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 180kB disk space will be freed.
Do you want to continue [Y/n]?
dpkg: error processing flashplugin-installer (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 flashplugin-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
ola@minifix:~$

I try to re-install:

ola@minifix:~$ sudo apt-get -f install flashplugin-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
flashplugin-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0B/19.2kB of archives.
After this operation, 0B of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package flashplugin-installer.
(Reading database ... 102634 files and directories currently installed.)
Preparing to replace flashplugin-installer 10.0.22.87ubuntu2 (using .../flashplugin-installer_10.0.22.87ubuntu2_i386.deb) ...
dpkg (subprocess): unable to execute old pre-removal script: Exec format error
dpkg: warning - old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
prerm called with unknown argument `failed-upgrade'
dpkg: error processing /var/cache/apt/archives/flashplugin-installer_10.0.22.87ubuntu2_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
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:
 /var/cache/apt/archives/flashplugin-installer_10.0.22.87ubuntu2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ola@minifix:~$

I download flash-plugin from Adobes site and try to install:

ola@minifix:~/Desktop$ sudo dpkg -i install_flash_player_10_linux.deb
(Reading database ... 102634 files and directories currently installed.)
Preparing to replace adobe-flashplugin 10.0.22.87-1 (using install_flash_player_10_linux.deb) ...
update-alternatives: error or eof reading /var/lib/dpkg/alternatives/iceape-flashplugin for update_mode ()
dpkg: warning - old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
update-alternatives: error or eof reading /var/lib/dpkg/alternatives/iceape-flashplugin for update_mode ()
dpkg: error processing install_flash_player_10_linux.deb (--install):
 subprocess new pre-removal script returned error exit status 2
postinst called with argument `abort-upgrade'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 install_flash_player_10_linux.deb
ola@minifix:~/Desktop$

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/sbin/synaptic
Package: synaptic 0.62.5ubuntu2.1
ProcAttrCurrent: unconfined
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: synaptic
Tags: ubuntu-unr
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
OlaJi (ola-jirlow) wrote :
Revision history for this message
OlaJi (ola-jirlow) wrote :
Revision history for this message
pingflood (pingflood) wrote :

Here's a workaround:

Execute this to remove all zero byte files related to Flash in /var/lib/dpkg/alternatives/:

find /var/lib/dpkg/alternatives/*flash* -type f -size 0 | xargs sudo rm

Then try again install/remove flashplugin.

Revision history for this message
OlaJi (ola-jirlow) wrote :

Thank You Diogo, after removing the files as suggested install/remove works.

Revision history for this message
Daniel (djuatdelta) wrote :

I'm having the same problem. However, instead of the flashplugin-installer, I am dealing with the adobe-flash-plugin.

Here's what happens when I try to remove "firefox":

daniel@laptop:~$ sudo apt-get remove firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  firefox
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B/3964kB of archives.
After this operation, 127kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 134121 files and directories currently installed.)
Preparing to replace adobe-flashplugin 10.0.22.87-2jaunty1 (using .../adobe-flashplugin_10.0.22.87-2jaunty1_i386.deb) ...
update-alternatives: unable to make /usr/lib/firefox/plugins/flashplugin-alternative.so.dpkg-tmp a symlink to /etc/alternatives/firefox-flashplugin: No such file or directory
dpkg: warning - old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
update-alternatives: unable to make /usr/lib/firefox/plugins/flashplugin-alternative.so.dpkg-tmp a symlink to /etc/alternatives/firefox-flashplugin: No such file or directory
dpkg: error processing /var/cache/apt/archives/adobe-flashplugin_10.0.22.87-2jaunty1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 2
postinst called with argument `abort-upgrade'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/adobe-flashplugin_10.0.22.87-2jaunty1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
daniel@laptop:~$

Revision history for this message
Daniel (djuatdelta) wrote :

When I enter:

sudo apt-get remove adobe-flashplugin

I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  adobe-flashplugin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 10.2MB disk space will be freed.
Do you want to continue [Y/n]? Y
dpkg: error processing adobe-flashplugin (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 adobe-flashplugin
E: Sub-process /usr/bin/dpkg returned an error code (1)

When I try to reinstall using Synaptic, I get this error message:

E: /var/cache/apt/archives/adobe-flashplugin_10.0.22.87-2jaunty1_i386.deb: subprocess new pre-removal script returned error exit status 2

Revision history for this message
Victor Vargas (kamus) wrote :

Did you remove packages swfdec-mozilla and gnash (in case of you installed)?, I have Jaunty and I don't have this problem with flashplugin and mozilla firefox.

Regards

affects: synaptic (Ubuntu) → flashplugin-nonfree (Ubuntu)
Revision history for this message
Ronny Ager-Wick (ronny-ager-wick) wrote :
Download full text (4.3 KiB)

I got a similar problem when upgrading a computer from kubutu hardy 8.04 to karmic 9.10 using adept.
During the upgrade it said the flashplugin-non-free package failed in some way.
Now, it wont' install, configure or uninstall:

$ sudo apt-get install flashplugin-nonfree
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.
  flashplugin-nonfree: Depends: flashplugin-installer but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

$ sudo apt-get install flashplugin-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
(removed for clarity)
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  flashplugin-nonfree
Suggested packages:
  ttf-xfree86-nonfree xfs
The following NEW packages will be installed
  flashplugin-installer
The following packages will be upgraded:
  flashplugin-nonfree
1 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0B/21.4kB of archives.
After this operation, 61.4kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
dpkg: error processing flashplugin-nonfree (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 flashplugin-nonfree
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo dpkg-reconfigure flashplugin-nonfree
/usr/sbin/dpkg-reconfigure: flashplugin-nonfree is broken or not fully installed.

$ sudo dpkg -r --force-all flashplugin-nonfree
dpkg: warning: overriding problem because --force enabled:
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
(Reading database ... 250232 files and directories currently installed.)
Removing flashplugin-nonfree ...
update-alternatives: error: no alternatives for iceape-flashplugin.
update-alternatives: error: no alternatives for iceape-flashplugin.
dpkg: error processing flashplugin-nonfree (--remove):
 subprocess installed pre-removal script returned error exit status 2
postinst called with argument `abort-remove'
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 flashplugin-nonfree

OK, try to download and install:
$ wget http://no.archive.ubuntu.com/ubuntu/pool/multiverse/f/flashplugin-nonfree/flashplugin-nonfree_10.0.32.18ubuntu1_i386.deb
--2009-10-30 12:16:14-- http://no.archive.ubuntu.com/ubuntu/pool/multiverse/f/flashplugin-nonfree/flashplugin-nonfree_10.0.32.18ubuntu1_i386.deb
Resolving no.archive.ubuntu.com... 129.241.93.37, 2001:700:300:1800::b
Connecting to no.archive.ubuntu.com|129.241.93.37|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1766 (1.7K) [application/x-debian-package]
Saving to: `flashplugin-n...

Read more...

Revision history for this message
Ronny Ager-Wick (ronny-ager-wick) wrote :

Unfortunately Diogo's sugested workaround above does not work in my case, as no such files exist on the system.

Revision history for this message
Ronny Ager-Wick (ronny-ager-wick) wrote :

What worked for me was the suggestion made by halitech T July 27th, 2009, 12:50 AM:
http://ubuntuforums.org/archive/index.php/t-1223816.html
NOTE: This should be a LAST RESORT solution. Try all other solutions first!

I have copied and improved these instructions here:

1. Backup your /var/lib/dpkg/status file NB You MUST do this first, because if you lose this file, your system is hosed.
In a terminal, run: sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.backup

2. In a terminal, type in the following command: sudo nano /var/lib/dpkg/status
Replace "nano" with gedit, kate or whatever other editor you use.

3. Search for "flashplugin-nonfree" in the opened file.
In nano you can press Ctrl-W, then type "flashplugin-nonfree" (without the quotes) and press Enter
The different entries are delimited by empty lines. This means everything within the block containing
Do not delete the first and best match you get. Keep searching (press Crtl-W, then Enter again in nano) until you find a block (content between two empty lines) starting with:
Package: flashplugin-nonfree

4. Delete this block.
In nano, you can press Crtl-K to delete single lines until the next package appears (you will recognize this by the empty line and another "Package: something" line)

5. Save the file
In nano, Ctrl-X, Y, Enter

5.1 Run this:
sudo apt-get install flashplugin-nonfree
(not needed to get a working system, but wanted to keep the package installed)

5.2 In my case, as I started out doing a dist-upgrade, I ran the following commands:
sudo apt-get -f install
sudo apt-get autoremove
sudo aptitude dist-upgrade

6. restart the system (sudo shutdown -r now).

Revision history for this message
Jonathan Charbit (viebel) wrote :

It worked for me. Thanks!!!!

tags: added: exec-format-error
Revision history for this message
Alexey Gaskov (gaskovster) wrote :

The only solution that worked for me.
Thanks!

Revision history for this message
indya1989 (amitjetking-2007) wrote :

thanks buddy,
 you are the best, solved my problem.

Revision history for this message
rafaelasencioleon (rafaelasencioleon) wrote :

Easy, sorry for my english am spanish, forgot synaptyc, take and instal ubuntu tweak, uninstall flash pluning for synaptic, go to ubuntu tweak an instal, http://ubuntu-tweak.com/, first font adobe flash, and apps adobe flash, easy

Revision history for this message
Patrick (taishor) wrote :

Thank you Ronny Ager-Wick, it worked for me. Got this problem after an upgrade from 9.04 to 9.10 Ubuntu.

Revision history for this message
roger@saregune.net (roger-saregune) wrote :

thanks ronny, your solutions works

Revision history for this message
mix (mixmadmen) wrote :

Wanted to thank Ronny Ager-Wick for the fix-- this issue affected me. All previously mentioned fixes did not work.

Revision history for this message
Maurlclo (mauricio-mail) wrote :

Thanx Ronny Ager-Wick, it works. Ubuntu 10.04

Revision history for this message
hkais (r-2) wrote :

Roger Ager-Wick, thank you for your description! Solved my problem

I was upgrading from 8.04 to 10.04...

Revision history for this message
David Kuehn (dave-kuehn) wrote :

Thank you Roger Ager-Wick!

Like hkais, it was upgrading from 8.04 to 10.04 that caused the problem to appear. Your solution resolved the problem.

My error message was:

dpkg: error processing flashplugin-nonfree (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 flashplugin-nonfree
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
george (george-bok) wrote :

Thank you Ronny Ager-Wick. i went into this bug after upgrade from ubuntu 8.04 to 10.04 and i had a very difficult time...

Thanks very much....

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in flashplugin-nonfree (Ubuntu):
status: New → Confirmed
Revision history for this message
David Pérez (sanete) wrote :

Thanks Ronny, same problem with Precise Pangolin and solved with your valuable tip.

Revision history for this message
Francewhoa (francewhoa) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.