This command
$ sudo dpkg -r --force-depends libgl1-mesa libgl1-dev libgl1-dri libglu1-mesa libglu1-mesa-dev mesa-common-dev mesa-utils $ sudo apt-get install -f
also fixed my problem, which appears to be the same as the one mentioned in this bug report.
This command
$ sudo dpkg -r --force-depends libgl1-mesa libgl1-dev
libgl1-dri libglu1-mesa libglu1-mesa-dev mesa-common-dev mesa-utils
$ sudo apt-get install -f
also fixed my problem, which appears to be the same as the one mentioned in this bug report.