Can not load kext

I'm trying to load a kext following this official documentation page, but when i try to load the kext with:

sudo kextutil -t /tmp/resourceCompressor.kext/

I get this error:

Executing: /usr/bin/kmutil load --bundle-path /tmp/resourceCompressor.kext
Error Domain=KMErrorDomain Code=71 "Kernel request failed: (libkern/kext) not loadable (reason unspecified) (-603946989)" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) not loadable (reason unspecified) (-603946989)}

Also if i try to use the no load option i get another error:

sudo kextutil -t -n /tmp/resourceCompressor.kext/
kextutil: -n is not a supported kmutil mode

As far as i understand the kextutil, kextload, kextunload binaries have been deprecated i favour of kmutil but i cant find any guide on how to use it, and still i dont know why my kext cant be load. What can I do to load it?

Answered by panz in 691656022

I solved this by myself. First of all as of macOS 11 every third party kext should be located in /Library/Extensions in order to be loaded by the system. And every time you rebuild it and try to load it with kextutil you will be prompted with a SystemPreferences app request you must approve and after that you will be allowed to load the kext only after rebooting the system. So as far i understand you should repeat this process every time for every rebuild.

I found this note on apple site: Note In macOS 11 and later, kmutil replaces kextload, kextunload, and other earlier tools for loading and managing kexts. The older tools still work, but their implementations now call kmutil.

Accepted Answer

I solved this by myself. First of all as of macOS 11 every third party kext should be located in /Library/Extensions in order to be loaded by the system. And every time you rebuild it and try to load it with kextutil you will be prompted with a SystemPreferences app request you must approve and after that you will be allowed to load the kext only after rebooting the system. So as far i understand you should repeat this process every time for every rebuild.

Can not load kext
 
 
Q