Cannot remove nvidia package because of No diversion ‘diversion ?

Oct 1st, 2012 | By | Category: Linux / Freebsd

Got this error today:

Fetched 1,845 kB in 2s (853 kB/s)
(Reading database … 213548 files and directories currently installed.)
Removing libgl1-nvidia-alternatives …
No diversion ‘diversion of /usr/lib/libGL.so.1.2 to /usr/lib/nvidia/diversions/libGL.so.1.2 by libgl1-nvidia-alternatives’, none removed.
Removing ‘diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-alternatives’
dpkg-divert: rename involves overwriting `/usr/lib/libGL.so.1′ with
different file `/usr/lib/nvidia/diversions/libGL.so.1′, not allowed
dpkg: error processing libgl1-nvidia-alternatives (–remove):
subprocess installed post-removal script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
libgl1-nvidia-alternatives
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

Good times as it was preventing compiz or anythign else from being installed.. Quick fix to this was to just manually delete the entire /usr/lib/nvidia directory.. problem solved

Leave a Comment