I broke package fglrx. How do I fix it?

Asked by thewilbob@comcast.net

Here is the output from 'apt-get purge fglrx\

The following packages will be REMOVED:
  fglrx
0 upgraded, 0 newly installed, 1 to remove and 7 not upgraded.
1 not fully installed or removed.
After this operation, 65.5MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 191907 files and directories currently installed.)
Removing fglrx ...
dpkg-divert: mismatch on package
  when removing `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by fglrx'
  found `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx'
dpkg: error processing fglrx (--remove):
 subprocess installed post-removal script returned error exit status 2
Processing triggers for ureadahead ...
Errors were encountered while processing:
 fglrx
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question information

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

I took a chance with dpkg-divert and fixed the problem:
sudo dpkg-divert --remove /usr/lib/libGL.so.1.2
[sudo] password for wil:
Removing `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx'

Synaptic was now able to remove the package and I can update again.

wil