2016-04-18 43 views
-1

我有一个scsript使用包LWP :: Curl 但是当我尝试使用此命令安装它时[sudo cpanm install LWP :: Curl]出现以下错误: -Perl:不能使用cpan安装依赖项

Fetching http://www.cpan.org/authors/id/S/SY/SYP/Net-Curl-0.37.tar.gz 
-> OK 
Unpacking Net-Curl-0.37.tar.gz 
Entering Net-Curl-0.37 
Checking configure dependencies from META.json 
Checking if you have ExtUtils::MakeMaker::Config 0 ... Yes (6.66) 
Configuring Net-Curl-0.37 
Running Makefile.PL 
pkgconfig failed: 
Can't locate ExtUtils/PkgConfig.pm in @INC (you may need to install the ExtUtils::PkgConfig module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at Makefile.PL line 39. 

Using curl-config script. 
Can't exec "curl-config": No such file or directory at Makefile.PL line 212. 
curl-config failed: 
Execution curl-config --vernum failed. 
is your libcurl installed correctly ? 


libcurl development files do not seem to be available 
You must install libcurl 7.15.5 or newer to 
build this module 

NA: Unable to build distribution on this platform. 
-> N/A 
-> FAIL Configure failed for Net-Curl-0.37. See /home/harsh/.cpanm/work/1460968559.18563/build.log for details. 

我是Perl新手,如何解决这个问题?

回答

1

听起来像Net :: CURL包中的一个错误,它无法正确列出它的依赖关系。

先安装ExtUtils :: PkgConfig(就像错误消息所述)。

然后使用平台的软件包管理系统安装libcurl(如果您的平台区分该软件包和基本软件包,则为-dev版本)(同样,如错误消息所示)。