简体   繁体   English

从CPAN失败安装Perl模块

[英]Perl Module Installation From CPAN Failure

I am trying to install module Algorithm::SVM from CPAN but I get the error listed below. 我正在尝试从CPAN安装模块Algorithm::SVM ,但出现以下错误。 At the message it says "failed". 在消息中显示“失败”。 What may be the error? 可能是什么错误?

*kadir@kadir-Inspiron-N5010:cpan install Algorithm::SVM
Reading '/home/kadir/.cpan/Metadata'
  Database was generated on Thu, 07 Jan 2016 07:54:01 GMT
Running install for module 'Algorithm::SVM'

......

Makefile:350: recipe for target 'bindings.o' failed

make: *** [bindings.o] Error 1

  LAIRDM/Algorithm-SVM-0.13.tar.gz

  /usr/bin/make -- NOT OK*

If you are using Debian go to the build location of the module(after you ran cpan Algorithm::SVM ): 如果您使用的是Debian,请转到模块的构建位置(运行cpan Algorithm :: SVM之后):

sudo vim /home/youruser/.cpan/build/Algorithm-SVM-0.13-biHfmx/bindings.h

Add these two lines in this area: 在此区域中添加以下两行:

using namespace std; 

#include <vector> 
#include <map> 
#include <assert.h> 
#include <cstdlib>         <=====  Add these
#include <string.h>        <=====  two lines

Save and exit and the rebuild the module from here: 保存并退出,然后从此处重建模块:

sudo make
sudo make install

Test if the installation is successful: 测试安装是否成功:

sudo cpan Algorithm::SVM

Here is a more detailed explanation concerning this issue: https://rt.cpan.org/Public/Bug/Display.html?id=43669 这是有关此问题的更详细说明: https : //rt.cpan.org/Public/Bug/Display.html?id=43669

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM