Apple - Trying to force update_dyld_shared_cache but having some errors

What fixed it for me was

update_dyld_shared_cache -debug

This is what you should see

update_dyld_shared_cache: adding root: /System/Library/...
...
...
update_dyld_shared_cache: /var/db/dyld/dyld_shared_cache_i386 is up-to-date
update_dyld_shared_cache: /var/db/dyld/dyld_shared_cache_x86_64 is up-to-date

to be sure it works I run

update_dyld_shared_cache 

a second time


Reboot your mac in recovery mode (https://support.apple.com/en-ca/HT201314), Open Terminal there and type

rm -rf /Volumes/<your_system_volume>var/db/spindump/*

After that restart your mac and repeat the operation

sudo update_dyld_shared_cache -root / -force

PS see detailed comment from @CharlieMonroe