Machine learning 由于vowpal wabbit';s对boost库的依赖
我正在努力安装vowpal wobbit,但在运行make文件时失败,抛出:Machine learning 由于vowpal wabbit';s对boost库的依赖,machine-learning,vowpalwabbit,large-data,Machine Learning,Vowpalwabbit,Large Data,我正在努力安装vowpal wobbit,但在运行make文件时失败,抛出: cd library; make; cd .. g++ -g -o ezexample temp2.cc -L ../vowpalwabbit -l vw -l allreduce -l boost_program_options -l z -l pthread ld: library not found for -lboost_program_options collect2: ld re
cd library; make; cd ..
g++ -g -o ezexample temp2.cc -L ../vowpalwabbit -l vw -l allreduce -l boost_program_options -l z -l pthread
ld: library not found for -lboost_program_options collect2: ld returned 1 exit status make[1]: *** [ezexample] Error 1'
然后,我在这里通过指定-L/usr/local/lib添加了到boost库的链接
现在我得到以下错误:
g++ -g -o ezexample temp2.cc -L/usr/local/lib ../vowpalwabbit -l vw -l allreduce -l boost_program_options -l z -l pthread
ld: library not found for -lvw
collect2: ld returned 1 exit status
make: *** [ezexample] Error 1
我碰巧在OS X 10.7上实现了如下所有功能:
boost
文件夹,然后在shell提示下:
$ ./bootstrap.sh
$ ./bjam
这将编译和构建所有内容。现在,在boost
目录中应该有一个bin.v2/
目录,其中包含系统的所有内置库(静态库和线程库)
更重要的是,额外的Boost库在stage/lib/
目录中提供。对我来说,这些是Mach-O 64位动态链接共享库x86_64
包含路径应该是your_install_dir/boost_x_xx_x
,其中boost_x_xx_x
是工作boost的基本名称。(我个人在/usr/local/share/
中有boost\u 1\u 46\u 1
,我将其符号链接到/usr/local/share/boost
,以避免记住版本号。)库路径(用于链接)应为您的安装目录/boost\u x\u xx\u x/stage/lib
。但是,最好是在通常的位置对所有内容进行符号链接或复制(我就是这么做的),即头文件为/usr/local/include/boost
,库为/usr/local/lib
vowpal_wabbit
目录编辑Makefile
,并更改include/library路径以反映当前安装。Makefile
应该如下所示(前12行):
然后,您就可以编译vowpal_wabbit
(make clean
,如果您已经编译了它):
您还可以使用以下方式在OS X上安装vowpal wabbit: 或者您可以只安装boost,然后从github repo安装
vw
brew install boost
对于CentOS 7上的安装(6.5 perl版本对于最新的vw源代码来说太旧了),我发现上的说明可以正常工作:
yum install zlib-devel boost-devel
yum groupinstall "Development Tools"
git clone git://github.com/JohnLangford/vowpal_wabbit.git
cd vowpal_wabbit
./autogen.sh
make
make test
这(可能)更适合这样做。投票结束。不过,我正在寻找使用过vowpal wabbit的人。您是否有可用的
boost
安装?如果我没记错的话,program\u选项
库应该单独构建。另外,在-L
或-L
开关后应该没有空格。(+1)是的,这就是我现在所做的,我确实切换到了自制。如果你用brew安装了vowpal wabbit,你能用vw hypersearch实用程序吗?我得到了一个错误,说明“命令未找到”,但大众的其余工作良好。
$ make
$ ./vw --version
6.1
$ make test
brew install vowpal-wabbit
brew install boost
yum install zlib-devel boost-devel
yum groupinstall "Development Tools"
git clone git://github.com/JohnLangford/vowpal_wabbit.git
cd vowpal_wabbit
./autogen.sh
make
make test