解决Package fuse was not found in the pkg-config search path.

gcc -Wall `pkg-config fuse --cflags --libs` -D_FILE_OFFSET_BITS=64 fusexmp.c -o fusexmp

Package fuse was not found in the pkg-config search path.

Perhaps you should add the directory containing `fuse.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fuse' found
/tmp/ccPbq501.o: In function `main':
fusexmp.c:(.text+0x73b): undefined reference to `fuse_main_real'

collect2: ld 返回 1


解决办法:

1)拷贝缺失库文件到/usr/lib/pkgconfig路径下,未指定安装目录

cp /usr/local/lib/pkgconfig/fuse.pc /usr/lib/pkgconfig/

参考链接:http://blog.sina.com.cn/s/blog_77ed43e301018iuu.html

结果:未解决


2)卸载fuse重新编译安装,安装到指定目录/usr下

参考链接:http://www.cnblogs.com/dengke/archive/2010/02/15/1668325.html

结果:未解决


3) 导入 PKG_CONFIG_PATH(在2)的前提下)

export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/

ldconfig

参考链接:http://www.linuxquestions.org/questions/linux-software-2/pkg_config_path-environment-variable-129278/

结果:已解决


fuse使用:

http://blog.csdn.net/langeldep/article/details/6221112


你可能感兴趣的:(linux)