0

Ran:

unlink /usr/lib/libz.1.dylib

Now I can't launch from my user profile.

I have been able to run in recovery mode, where I can see the .dylib in question is there, but running in single-user mode I get the error:

dyld: Library not loaded: /usr/lib/libz.1.dylib

Reason: image not found

And, if I cd into lib, and type 'ls' libz.1.dylib isn't listed there.

Help please! (I'm out of my depth)

Thanks

1 Answer 1

0

The recovery partition is completely separate from the main OS partition. I'm running 10.15 not 10.12, but the approach will be similar if not identical:

hdiutil attach /Volumes/Recovery/*/BaseSystem.dmg
cp '/Volumes/macOS Base System/usr/lib/libz.1.dylib' /usr/lib/
diskutil unmount '/Volumes/macOS Base System'

The first line mounts the recovery partition so you can access it. It'll tell you what it mounted as, for me it was /Volumes/macOS Base System. Then you can copy the file from there to the main OS partition. The third line then unmounts the recovery image

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .