Wednesday, September 8, 2010

pkg-config

感觉centOS上的fuse版本太低, 还是从源代码安装。

简单编译后:
./configure --prefix=/usr/local/fuse

fuse-python-binding就无法安装。问题是fuse-python-binding的setup.py需要使用pkg-config取得编译参数。

 pkg-config --list-all  |grep fuse
无法找到pkg-config需要的*.pc metainfornation文件。

可以手工增加:

$ PKG_CONFIG_PATH=/usr/local/fuse/lib/pkgconfig/ pkg-config --list-all |grep fuse
fuse                        fuse - Filesystem in Userspace

所以, 下面的方法可以安装:
$ sudo PKG_CONFIG_PATH=/usr/local/fuse/lib/pkgconfig/ python setup.py install

[jessinio@niowork site-packages]$ /usr/local/python2.6/bin/python -c "import fuse"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "fuse.py", line 27, in <module>
    from fuseparts._fuse import main, FuseGetContext, FuseInvalidate
ImportError: libfuse.so.2: cannot open shared object file: No such file or directory


需要增加lib路径:
$ sudo sh -c "echo /usr/local/fuse/lib >> /etc/ld.so.conf.d/fuse.conf "
$ sudo ldconfig

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.