OS:OS X Mavericks(v10.9)
FUSE:OSXFUSE v2.6.2
我正在尝试编译loopback filesystem in 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
有人能指出我正确的方向吗?
答案 0 :(得分:4)
就第一个问题而言,您需要编译器可以看到的某个OSXFUSE库,或者您需要告诉编译器它在哪里。
使用mdfind
找到osxfuse
库文件,然后将-L/path/to/osxfuse
添加到makefile的编译/配置脚本中可能会有所成功。
同样,对于第二个,尝试确保boxfs2知道保险丝标头:看起来像添加-I/usr/local/include/osxfuse/fuse
可能会这样做。