The problem: update-alternatives: using /usr/lib/mesa/ld.so.conf to provide /etc/ld.so.conf.d/GL.conf (gl_conf) in auto mode.
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
The solution: sudo dpkg-divert --remove /usr/lib/libGL.so.1.2
The problem: alternatives: using /usr/lib/ mesa/ld. so.conf to provide /etc/ld. so.conf. d/GL.conf (gl_conf) in auto mode.
update-
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
The solution: libGL.so. 1.2
sudo dpkg-divert --remove /usr/lib/