Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
brew doctor and truecrypt
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/" \
"/usr/local/lib/" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
for lib in "${libs[@]}"
mv $lib "${truecrypt}/." && echo "Moved ${lib} to ${truecrypt}."
rm $lib
ln -s "${truecrypt}/$(basename $lib)" ${lib} && echo "Linked ${lib}."
Copy link

jimjh commented Oct 14, 2012

Try this if brewing libfuse on your own didn't work out.

Copy link

samueljohn commented Oct 24, 2012

@jimjh So truecrypt does not hardcode the rpath and searches for the needed libs also in its Contents/Resources/Library? Cool.
And when I then brew fuse4x, truecrypt is still happy?

Copy link

jimjh commented Oct 26, 2012

@samueljohn Sorry for not getting back to you sooner. I am not sure about hardcoding, but the trick I used is ln -s "${truecrypt}/$(basename $lib)".

The only thing this script does is to move the libs to Contents/Resources/Library and then create symlinks in /usr/local/lib. For some reason, homebrew is OK with the symlinks but not OK with the actual libs. Very hacky, I know.

Copy link

n8henrie commented Feb 28, 2013

Thanks -- this worked okay for me. I had to first

mkdir /Applications/

After that, I got a permissions error with /usr/local/lib/pkgconfig/osxfuse.pc, so I ended up manually copying the file, then

rm /Applications/
ln -s /Applications/ /usr/local/lib/pkgconfig/

I probably could have just

sudo mv /usr/local/lib/pkgconfig/osxfuse.pc /Applications/

Interestingly, I first tried manually making the symlink, and this failed -- brew doctor still didn't like it, even though it was an alias. Confirmed that the file was deleted. I noticed that the manually created (drag-and-drop) symlink included a "date added" in Finder, and the ones created by the above script did not, so I deleted the manually created symlink and made one with ln -s, which had no "date added" like the others, and this made "brew doctor" happy.


Copy link

SteveBenner commented Sep 18, 2014

This script will solve the issue cleanly, if anyone is interested. Just run once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment