Trying to force update_dyld_shared_cache but having some errors

I am trying to force the update of my dyld shared cache using the command

sudo update_dyld_shared_cache -root / -force

But after a while I see a bunch of errors like this, related to spindump:

update_dyld_shared_cache[719] : Unable to unlink //var/db/spindump/OLDDSC-E2D77243-3FD9-32E5-AE64-3506904D5579: 1 Operation not permitted

How do I fix this?

I am on El Capitan.


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


the -debug flag on update_dyld_shared_cache doesn't do anything except provide more detail on the work that is being done -- that is makes the reporting more verbose.

I'd use: sudo update_dyld_shared_cache -root / -force

All systems provide 'errors' though these aren't issues, rather information on what can't be done or skipped because the way the module is implimented.

These are the typical 'errors' for a heathly system:

update_dyld_shared_cache: warning: x86_64h skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-1.dat update_dyld_shared_cache: warning: x86_64h skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-2.dat update_dyld_shared_cache: warning: x86_64h skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-3.dat update_dyld_shared_cache: warning: i386 skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-1.dat update_dyld_shared_cache: warning: i386 skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-2.dat update_dyld_shared_cache: warning: i386 skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-3.dat update_dyld_shared_cache: warning: x86_64h rejected from cached dylibs: /System/Library/PrivateFrameworks/CreateML.framework/Versions/A/CreateML (("Could not find dependency '/System/Library/PrivateFrameworks/TuriCore.framework/Versions/A/TuriCore'")) update_dyld_shared_cache: warning: x86_64h rejected from cached dylibs: /usr/lib/swift/libswiftCreateML.dylib (("Could not find dependency '/System/Library/PrivateFrameworks/TuriCore.framework/Versions/A/TuriCore'")) bash-3.2$ sudo update_dyld_shared_cache -root -force update_dyld_shared_cache: error: could not stat root file system because 'No such file or directory' bash-3.2$ sudo update_dyld_shared_cache -root / -force update_dyld_shared_cache: warning: x86_64h skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-1.dat update_dyld_shared_cache: warning: x86_64h skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-2.dat update_dyld_shared_cache: warning: x86_64h skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-3.dat update_dyld_shared_cache: warning: i386 skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-1.dat update_dyld_shared_cache: warning: i386 skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-2.dat update_dyld_shared_cache: warning: i386 skipping because of bad install name /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/Resources/fcl-fc-3.dat update_dyld_shared_cache: i386 incorporating 629 OS dylibs, tracking 456 others, building closures for 243 executables update_dyld_shared_cache: warning: x86_64h rejected from cached dylibs: /System/Library/PrivateFrameworks/CreateML.framework/Versions/A/CreateML (("Could not find dependency '/System/Library/PrivateFrameworks/TuriCore.framework/Versions/A/TuriCore'")) update_dyld_shared_cache: warning: x86_64h rejected from cached dylibs: /usr/lib/swift/libswiftCreateML.dylib (("Could not find dependency '/System/Library/PrivateFrameworks/TuriCore.framework/Versions/A/TuriCore'"))