Today I encountered Error 7 when trying to flash a custom ROM. I had Lineage 14.1 prev. and was switching to Omega.
None of the help online helped, so this is for anyone with the same problem. I checked recovery.log.
/system in read only mode. Installer cannot create toolbox directory.
Full wipe, including /system. Then my ROM installed. Hope this helps.