How to copy a file into hidden usr/lib folder on macOS Monterey?

Hi there,


Need to copy a small file into usr/lib folder.


Usually it's hidden, I know, but I was able to see it running a terminal command Now I can't copy or modify anything there, say it's a system protected and etc.


Already tried crsutil "disable" to no avail.


Also moved the system SSD to other computer, mounted as an external disk, and the same result: I can't copy anything there.


Any hints on this?

Posted on Oct 30, 2023 7:40 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 30, 2023 8:44 PM

/usr/local/lib actually.

or

/opt/lib

and arrange for your program to find it. Maybe setting LD_LIBRARY_PATH environment variable.


/use/lib is on the readonly boot volume. You cannot add, remove nor modify anything on the readonly boot volume.

Similar questions

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to copy a file into hidden usr/lib folder on macOS Monterey?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.