https://www.travelertechie.com/2019/02/how-to-rebuild-cache-and-repair.htmlHow To Rebuild Cache And Repair Permissions Of Kexts In A Hackintosh
After installing 3rd-party kexts in /Library/Extensions, or replacing vanilla kexts with patched kexts in System/Library/Extensions, you may want to repair their permissions and rebuild the kext cache to ensure they work as intented. Here's how.
Repair permissions in /S/L/E (System/Library/Extensions) and /L/E (Library/Extensions) folders
Type each of the following commands (separately) in Terminal:
sudo chmod -Rf 755 /S*/L*/E*
sudo chmod -Rf 755 /L*/E*
sudo chown -Rf 0:0 /S*/L*/E*
sudo chown -Rf 0:0 /L*/E* Rebuild Kext Cache
Type the following command in the Terminal:
sudo kextcache -i /Restart your computer for the repairs to take effect.
https://osxlatitude.com/forums/topic/9961-how-do-i-repair-permissions-and-rebuild-the-cache-yosemite-and-later/To repair permissions, type the following Terminal commands:
sudo chmod -Rf 755 /S*/L*/E*
sudo chmod -Rf 755 /L*/E*
sudo chown -Rf 0:0 /S*/L*/E*
sudo chown -Rf 0:0 /L*/E*To rebuild kextcache and prelinked kernel, type the following Terminal command:
sudo touch -f /S*/L*/E*
sudo touch -f /L*/E*
sudo kextcache -Boot -U /Sometimes, the system returns an error message about not being able to modify/rebuild the cache and/or the prelinked kernel. In this case, the existing cache and prelinked kernel can be deleted using the following Terminal commands:
sudo rm -Rf /S*/L*/PrelinkedKernels
sudo rm -Rf /S*/L*/Caches/com.apple.kext.cachesThe cache and prelinked kernel can then be rebuilt using the above touch and kextcache commands.