Ubuntu 16.04 Failed to created shared shared memory file: Permission denied?

As I wrote before in a comment: this happens when you reinstall without formatting the root partition (or partitions where the packages are stored e.g. /usr if you do such a thing). Ubiquity Installer tries to restore the previously installed packages and during that stage Webkit seems to act up. If you open a terminal and run top you will find a WebKitWebProcess consuming 100% CPU, kill it with killall WebKitWebProcess and the installation will continue. You may not be able to spawn a terminal when it already happened, instead switch to a virtual terminal with Ctrl+Alt+F1 login as user ubuntu with an empty password and kill the process there, be patient, it might take some time to perform this, then switch back to the GUI Ctrl+Alt+F7 and wait for the installation to continue and complete.

I filed a bug on Launchpad for this after some testing: https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1607779


If all of this doesn't work for you and you can't get Ubuntu installed without formatting the partition, then make a list of installed packages (dpkg -l with minimal scripting and review of the output can do this for you) and compare modifications you made to /etc and other directories. This is another reason to make backups: compare what previously had after a fresh install.