Mac OS X can't find libfuse.dylib
stanimirivanovde opened this issue · comments
Hey, I just encountered an error where jnr-fuse will refuse to mount a volume with "Image not found" unsatisfied link error. I looked into it and thought it is due to the fact they changed osxfuse to macfuse. But looking at it further pointed to the path being an issue. If I add the following line before mounting, then everything works:
System.setProperty("java.library.path", "/usr/local/lib/");
The library is installed correctly, and the kernel extension is loaded etc. I'm not sure if this is just me but I'm running on a new 16" Macbook Pro with latest Big Sur update.
I looked at your code and saw that you're not passing absolute paths but rather the lib name:
private static final String[] osxFuseLibraries = {"fuse4x", "osxfuse", "macfuse", "fuse"};
Not sure if it makes sense for me to do a pull request since this can be worked around with the line of code I posted above.
Hey, @stanimirivanovde!
Thanks for reporting! The path is included now by default for MacOS:
jnr-fuse/src/main/java/ru/serce/jnrfuse/AbstractFuseFS.java
Lines 47 to 51 in 00750de