Problem
Firefox fails to start with the following error:
/lib/x86_64-linux-gnu/libgdk-3.so.0: undefined symbol: cairo_xlib_surface_get_display
Cause
Firefox loads libraries from /usr/local/lib instead of /usr/lib/x86_64-linux-gnu/. The /usr/local/lib directory contains an outdated version of Cairo that is incompatible with the installed version of libgdk-3.
Solution
Remove the /usr/local/lib entry from the linker configuration files:
1sudo grep -r "/usr/local/lib" /etc/ld.so.conf.d/
2# Edit the file(s) found and remove the line
Reload the dynamic linker cache:
1sudo ldconfig
Firefox should now start without errors.