Unable to format Mac internal drive (disk0)
You need to boot from another disk and run disk utility and install from that drive.

You cannot boot from a disk that you want to erase or partition or re-install the system on.