I recently installed MicroG for LineageOS on my OnePlus 5. After downloading the latest update using the updater in settings, I clicked install. The phone rebooted into TWRP and started to update itself but showed multiple error messages which said "unable to mount /data". The phone booted back into Lineage and said that the update failed to install. In the updater, the same update I had just tried to install had an install button, also indicating that the update had failed. I tried installing the update again and got the same result.
Why is the update not installing, and what can I do to get it to install?