pyvlfeat安装过程中出现错误:/usr/bin/ld: 找不到-lboost_python-mt-py26。

5

我在安装pyvlfeat 0.1.1a3时遇到以下错误,但是没有找到解决方法:/usr/bin/ld: cannot find -lboost_python-mt-py26

我已经安装了boost python。以下是控制台输出:

lenovo@lenovo-ThinkPad-T61:~/Downloads/pyvlfeat-0.1.1a3$ ipython
Python 2.7.2+ (default, Oct  4 2011, 20:03:08) 
Type "copyright", "credits" or "license" for more information.

IPython 0.12 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: run setup.py clean
running clean
removing 'build/temp.linux-i686-2.7' (and everything under it)

In [2]: run setup.py build
running build
running build_py
running build_ext
building '_vlfeat' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/vlfeat
creating build/temp.linux-i686-2.7/vlfeat/vl
creating build/temp.linux-i686-2.7/vlfeat/mser
creating build/temp.linux-i686-2.7/vlfeat/sift
creating build/temp.linux-i686-2.7/vlfeat/imop
creating build/temp.linux-i686-2.7/vlfeat/misc
creating build/temp.linux-i686-2.7/vlfeat/kmeans
creating build/temp.linux-i686-2.7/vlfeat/quickshift
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/aib.c -o build/temp.linux-i686-2.7/vlfeat/vl/aib.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/generic.c -o build/temp.linux-i686-2.7/vlfeat/vl/generic.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/hikmeans.c -o build/temp.linux-i686-2.7/vlfeat/vl/hikmeans.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/ikmeans.c -o build/temp.linux-i686-2.7/vlfeat/vl/ikmeans.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/imopv.c -o build/temp.linux-i686-2.7/vlfeat/vl/imopv.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mathop.c -o build/temp.linux-i686-2.7/vlfeat/vl/mathop.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mathop_sse2.c -o build/temp.linux-i686-2.7/vlfeat/vl/mathop_sse2.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/pgm.c -o build/temp.linux-i686-2.7/vlfeat/vl/pgm.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/rodrigues.c -o build/temp.linux-i686-2.7/vlfeat/vl/rodrigues.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/stringop.c -o build/temp.linux-i686-2.7/vlfeat/vl/stringop.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/getopt_long.c -o build/temp.linux-i686-2.7/vlfeat/vl/getopt_long.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/host.c -o build/temp.linux-i686-2.7/vlfeat/vl/host.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/imopv_sse2.c -o build/temp.linux-i686-2.7/vlfeat/vl/imopv_sse2.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mser.c -o build/temp.linux-i686-2.7/vlfeat/vl/mser.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/random.c -o build/temp.linux-i686-2.7/vlfeat/vl/random.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/sift.c -o build/temp.linux-i686-2.7/vlfeat/vl/sift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/dsift.c -o build/temp.linux-i686-2.7/vlfeat/vl/dsift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/quickshift.c -o build/temp.linux-i686-2.7/vlfeat/vl/quickshift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/mser/vl_erfill.cpp -o build/temp.linux-i686-2.7/vlfeat/mser/vl_erfill.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/mser/vl_mser.cpp -o build/temp.linux-i686-2.7/vlfeat/mser/vl_mser.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_sift.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_sift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_dsift.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_dsift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_siftdescriptor.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_siftdescriptor.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/imop/vl_imsmooth.cpp -o build/temp.linux-i686-2.7/vlfeat/imop/vl_imsmooth.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/misc/vl_binsum.cpp -o build/temp.linux-i686-2.7/vlfeat/misc/vl_binsum.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_hikmeans.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeans.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_ikmeans.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeans.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_hikmeanspush.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeanspush.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_ikmeanspush.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeanspush.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/quickshift/vl_quickshift.cpp -o build/temp.linux-i686-2.7/vlfeat/quickshift/vl_quickshift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/py_vlfeat.cpp -o build/temp.linux-i686-2.7/vlfeat/py_vlfeat.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-i686-2.7/vlfeat/vl/aib.o build/temp.linux-i686-2.7/vlfeat/vl/generic.o build/temp.linux-i686-2.7/vlfeat/vl/hikmeans.o build/temp.linux-i686-2.7/vlfeat/vl/ikmeans.o build/temp.linux-i686-2.7/vlfeat/vl/imopv.o build/temp.linux-i686-2.7/vlfeat/vl/mathop.o build/temp.linux-i686-2.7/vlfeat/vl/mathop_sse2.o build/temp.linux-i686-2.7/vlfeat/vl/pgm.o build/temp.linux-i686-2.7/vlfeat/vl/rodrigues.o build/temp.linux-i686-2.7/vlfeat/vl/stringop.o build/temp.linux-i686-2.7/vlfeat/vl/getopt_long.o build/temp.linux-i686-2.7/vlfeat/vl/host.o build/temp.linux-i686-2.7/vlfeat/vl/imopv_sse2.o build/temp.linux-i686-2.7/vlfeat/vl/mser.o build/temp.linux-i686-2.7/vlfeat/vl/random.o build/temp.linux-i686-2.7/vlfeat/vl/sift.o build/temp.linux-i686-2.7/vlfeat/vl/dsift.o build/temp.linux-i686-2.7/vlfeat/vl/quickshift.o build/temp.linux-i686-2.7/vlfeat/mser/vl_erfill.o build/temp.linux-i686-2.7/vlfeat/mser/vl_mser.o build/temp.linux-i686-2.7/vlfeat/sift/vl_sift.o build/temp.linux-i686-2.7/vlfeat/sift/vl_dsift.o build/temp.linux-i686-2.7/vlfeat/sift/vl_siftdescriptor.o build/temp.linux-i686-2.7/vlfeat/imop/vl_imsmooth.o build/temp.linux-i686-2.7/vlfeat/misc/vl_binsum.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeans.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeans.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeanspush.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeanspush.o build/temp.linux-i686-2.7/vlfeat/quickshift/vl_quickshift.o build/temp.linux-i686-2.7/vlfeat/py_vlfeat.o -o build/lib.linux-i686-2.7/_vlfeat.so -msse -shared -lboost_python-mt-py26
/usr/bin/ld: cannot find -lboost_python-mt-py26
collect2: ld returned 1 exit status
An exception has occurred, use %tb to see the full traceback.

SystemExit: error: command 'g++' failed with exit status 1


In [3]: 

我是pyvlfeat的维护者。我已经有将近一年没有时间/兴趣去看它了,但我非常有兴趣再次尝试它。我想完全放弃boost.python和matplotlib的依赖关系。或许可以将matplotlib作为可选项。截至2012年10月1日,VLFeat获得了“PASCAL2”资金,因此在花费时间重写绑定之前,我正在等待看看这会带来什么。至于错误,您是否在库搜索路径中检查了libboost_python-mt-py26.{a,so}?如果它在其他地方,您需要更改库搜索路径;如果不是,则应重新安装boost.python。 - Peter Le Bek
1个回答

6

一个快速的解决方法是简单地编辑pyvlfeat的setup.py文件,并修改LinkArgs行以引用您安装的boost-python。 对于我的系统(以及可能许多其他系统),这只需要将-lboost_python-mt-py26更改为-lboost_python-mt-py27,以引用正确的Python版本。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接