在新的Ubuntu 16.04服务器上无法安装WWW:Curl

我试图找出为什么我不能在我的新服务器上安装WWW :: Curl 。 我已经搞定了:

apt-get install libcurl4-openssl-dev

…接着:

cpanm WWW::Curl

过了一会儿,我发现一个错误。 日志看起来像:

 cpanm (App::cpanminus) 1.7040 on perl 5.022001 built for x86_64-linux-gnu-thread-multi Work directory is /root/.cpanm/work/1496041822.25089 You have make /usr/bin/make You have LWP 6.15 You have /bin/tar: tar (GNU tar) 1.28 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Searching WWW::Curl () on cpanmetadb ... --> Working on WWW::Curl Fetching http://www.cpan.org/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz -> OK Unpacking WWW-Curl-4.17.tar.gz Entering WWW-Curl-4.17 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.04_01) Configuring WWW-Curl-4.17 Running Makefile.PL Locating required external dependency bin:curl-config... found at /usr/bin/curl-config. The version is libcurl 7.47.0 Found curl.h in /usr/include/curl/curl.h Building curlopt-constants.c for your libcurl version Building Easy.pm constants for your libcurl version Building Share.pm constants for your libcurl version Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for WWW::Curl Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.04_01) Building and testing WWW-Curl-4.17 cp lib/WWW/Curl/Easy.pm blib/lib/WWW/Curl/Easy.pm cp lib/WWW/Curl/Form.pm blib/lib/WWW/Curl/Form.pm cp lib/WWW/Curl.pm blib/lib/WWW/Curl.pm cp lib/WWW/Curl/Multi.pm blib/lib/WWW/Curl/Multi.pm cp lib/WWW/Curl/Share.pm blib/lib/WWW/Curl/Share.pm Running Mkbootstrap for WWW::Curl () chmod 644 "Curl.bs" "/usr/bin/perl" "-Iinc" "/usr/share/perl/5.22/ExtUtils/xsubpp" -typemap "/usr/share/perl/5.22/ExtUtils/typemap" -typemap "typemap" Curl.xs > Curl.xsc && mv Curl.xsc Curl.c x86_64-linux-gnu-gcc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" -fPIC "-I/u$ In file included from Curl.xs:574:0: curlopt-constants.c: In function âconstantâ: curlopt-constants.c:2033:44: warning: overflow in implicit constant conversion [-Woverflow] if (strEQ(name, "ANY")) return CURLAUTH_ANY; ^ curlopt-constants.c:2034:48: warning: overflow in implicit constant conversion [-Woverflow] if (strEQ(name, "ANYSAFE")) return CURLAUTH_ANYSAFE; ^ rm -f blib/arch/auto/WWW/Curl/Curl.so x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong Curl.o -o blib/arch/auto/WWW/Curl/Curl.so \ -L/usr/lib/x86_64-linux-gnu -lcurl \ chmod 755 blib/arch/auto/WWW/Curl/Curl.so "/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Curl.bs blib/arch/auto/WWW/Curl/Curl.bs 644 Manifying 1 pod document Running Mkbootstrap for WWW::Curl () chmod 644 "Curl.bs" PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00constants.t ........... ok # Failed test 'Got 1 or more cookies' # at t/01basic.t line 57. # Looks like you failed 1 test of 19. t/01basic.t ............... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/19 subtests t/02callbacks.t ........... ok t/04abort-test.t .......... ok t/05progress.t ............ ok t/06http-post.t ........... skipped: Not performing http POST/upload tests t/07ftp-upload.t .......... skipped: Not performing ftp upload tests t/08ssl.t ................. ok t/09times.t ............... ok t/10errbuf.t .............. ok t/13slowleak.t ............ skipped: Not performing slow leakage regression test t/14duphandle.t ........... ok t/15duphandle-callback.t .. ok t/16formpost.t ............ skipped: Not performing POST t/17slist.t ............... skipped: Not performing printenv cgi tests t/18twinhandles.t ......... ok t/19multi.t ............... ok t/20undefined_subs.t ...... ok t/21write-to-scalar.t ..... ok t/meta.t .................. skipped: Test::CPAN::Meta required for testing META.yml t/pod-coverage.t .......... skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod.t ................... skipped: Test::Pod 1.14 required for testing POD Test Summary Report ------------------- t/01basic.t (Wstat: 256 Tests: 19 Failed: 1) Failed test: 19 Non-zero exit status: 1 Files=22, Tests=816, 21 wallclock secs ( 0.26 usr 0.07 sys + 1.40 cusr 0.48 csys = 2.21 CPU) Result: FAIL Failed 1/22 test programs. 1/816 subtests failed. Makefile:936: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 255 -> FAIL Installing WWW::Curl failed. See /root/.cpanm/work/1496041822.25089/build.log for details. Retry with --force to force install it. 

如果我从CLI运行curl --version ,我得到一个结果,所以它必须安装。

我真的不知道还有什么可以尝试的。 任何人有任何build议?

通常,我现在find了答案! 我发现这个职位:

 https://stackoverflow.com/questions/42290344/failed-during-install-wwwcurleasy-in-cpan 

所以运行这个:

 apt-get install libwww-curl-perl 

…现在已经安装,似乎工作正常:)