操作系统: OS X Mavericks (v10.9)
FUSE: OSXFUSE v2.6.2
我正在尝试编译C语言中的回环文件系统, 但是遇到了以下错误:
$ make
cc -D_FILE_OFFSET_BITS=64 -I/usr/local/include/osxfuse/fuse -Wall -g -F/Library/Frameworks -o loopback loopback.c -losxfuse
ld: library not found for -losxfuse
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [loopback] Error 1
尝试编译 boxfs2 也会产生这个错误:
$ make
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libapp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libapp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libapp' found
Package libjson was not found in the pkg-config search path.
Perhaps you should add the directory containing `libjson.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libjson' found
Compiling boxfs.c
cc -c boxfs.c -o boxfs.o
boxfs.c:15:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
^
1 error generated.
make: *** [boxfs.o] Error 1
有人能指引我正确的方向吗?
-L/usr/local/lib/osxfuse/
可能是你要找的答案,但这只是我的猜测。 - Matthew G.-L/usr/local/lib/
解决了问题。不过还在尝试弄清楚 boxfs2。 - Jonukas