Search code examples
jsonperlcpan

Unable to install JSON::Parse with cpan


I'm trying to install JSON::Parse through cpan on an old Debian Etch server. When I do, it fails:

cpan[2]> install JSON::Parse
CPAN: Storable loaded ok (v2.15)
Going to read /root/.cpan/Metadata
  Database was generated on Wed, 23 Nov 2016 14:41:02 GMT
Running install for module 'JSON::Parse'
Running make for B/BK/BKB/JSON-Parse-0.48.tar.gz
CPAN: Digest::SHA loaded ok (v5.86)
CPAN: Compress::Zlib loaded ok (v2.068)
Checksum for /root/.cpan/sources/authors/id/B/BK/BKB/JSON-Parse-0.48.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
JSON-Parse-0.48/
JSON-Parse-0.48/unicode.c
JSON-Parse-0.48/examples/
JSON-Parse-0.48/t/
JSON-Parse-0.48/errors.c
JSON-Parse-0.48/lib/
JSON-Parse-0.48/utf8-byte-one.c
JSON-Parse-0.48/json-entry-points.c
JSON-Parse-0.48/json-common.c
JSON-Parse-0.48/json-perl.c
JSON-Parse-0.48/MANIFEST
JSON-Parse-0.48/MANIFEST.SKIP
JSON-Parse-0.48/typemap
JSON-Parse-0.48/utf8-next-byte.c
JSON-Parse-0.48/script/
JSON-Parse-0.48/unicode.h
JSON-Parse-0.48/json-whitespace.c
JSON-Parse-0.48/Json3.xs
JSON-Parse-0.48/Makefile.PL
JSON-Parse-0.48/README
JSON-Parse-0.48/Changes
JSON-Parse-0.48/META.yml
JSON-Parse-0.48/META.json
JSON-Parse-0.48/script/validjson
JSON-Parse-0.48/lib/JSON/
JSON-Parse-0.48/lib/JSON/Tokenize.pod
JSON-Parse-0.48/lib/JSON/Parse.pm
JSON-Parse-0.48/lib/JSON/Tokenize.pm
JSON-Parse-0.48/lib/JSON/Parse.pod
JSON-Parse-0.48/t/collision.t
JSON-Parse-0.48/t/whitespace.t
JSON-Parse-0.48/t/test.json
JSON-Parse-0.48/t/syntax.t
JSON-Parse-0.48/t/valid-json.t
JSON-Parse-0.48/t/numbers.t
JSON-Parse-0.48/t/unicode.t
JSON-Parse-0.48/t/perl-monks-1165399.t
JSON-Parse-0.48/t/array.t
JSON-Parse-0.48/t/syntax-error-1.json
JSON-Parse-0.48/t/kolmorogov42-1.t
JSON-Parse-0.48/t/object.t
JSON-Parse-0.48/t/utf8.t
JSON-Parse-0.48/t/Json3.t
JSON-Parse-0.48/t/test-empty-string.t
JSON-Parse-0.48/t/read-file.t
JSON-Parse-0.48/t/rfc7159.t
JSON-Parse-0.48/t/JSON-Parse.t
JSON-Parse-0.48/examples/assert.pl
JSON-Parse-0.48/examples/sasori.pl
JSON-Parse-0.48/examples/tokenize-synopsis.pl
JSON-Parse-0.48/examples/bad-utf8.pl
JSON-Parse-0.48/examples/kani.pl
JSON-Parse-0.48/examples/true-subs.pl
JSON-Parse-0.48/examples/long-number.pl
JSON-Parse-0.48/examples/synopsis.pl
JSON-Parse-0.48/examples/collide.pl
JSON-Parse-0.48/examples/array.pl
JSON-Parse-0.48/examples/key-collision.pl
JSON-Parse-0.48/examples/first-bit.pl
JSON-Parse-0.48/examples/json-tiny-round-trip-demo.pl
JSON-Parse-0.48/examples/chr.pl
JSON-Parse-0.48/examples/bad-utf8.txt
JSON-Parse-0.48/examples/ebi.pl
JSON-Parse-0.48/examples/hash.pl
CPAN: File::Temp loaded ok (v0.2304)
CPAN: YAML loaded ok (v0.88)

  CPAN.pm: Going to build B/BK/BKB/JSON-Parse-0.48.tar.gz

Checking if your kit is complete...
Looks good
Warning: Perl version 5.008009 or higher required. We run 5.008008.
JSON::PP 2.27103 is not available
 at /usr/local/share/perl/5.8.8/CPAN/Meta/Converter.pm line 57.
 at /usr/local/share/perl/5.8.8/ExtUtils/MM_Any.pm line 831.
Generating a Unix-style Makefile
Writing Makefile for JSON::Parse
Writing MYMETA.yml and MYMETA.json
cp lib/JSON/Parse.pod blib/lib/JSON/Parse.pod
cp lib/JSON/Tokenize.pm blib/lib/JSON/Tokenize.pm
cp lib/JSON/Tokenize.pod blib/lib/JSON/Tokenize.pod
cp lib/JSON/Parse.pm blib/lib/JSON/Parse.pm
Running Mkbootstrap for JSON::Parse ()
chmod 644 Parse.bs
/usr/bin/perl /usr/local/share/perl/5.8.8/ExtUtils/xsubpp  -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap  Json3.xs
> Json3.xsc && mv Json3.xsc Json3.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.48\" -DXS_VERSION=\"0.48\" -fPIC "-I/usr/lib/perl/5.8/CORE"   Json3.c
rm -f blib/arch/auto/JSON/Parse/Parse.so
cc  -shared -L/usr/local/lib Json3.o  -o blib/arch/auto/JSON/Parse/Parse.so     \
                \

chmod 755 blib/arch/auto/JSON/Parse/Parse.so
/usr/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- Parse.bs blib/arch/auto/JSON/Parse/Parse.bs 644
cp script/validjson blib/script/validjson
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/validjson
Manifying blib/man3/JSON::Parse.3pm
Manifying blib/man3/JSON::Tokenize.3pm
  BKB/JSON-Parse-0.48.tar.gz
  /usr/bin/make -- OK
Running make test
Running Mkbootstrap for JSON::Parse ()
chmod 644 Parse.bs
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'b
lib/lib', 'blib/arch')" t/*.t
t/array.t ............... ok
t/collision.t ........... ok
t/JSON-Parse.t .......... ok
t/Json3.t ............... ok
t/kolmorogov42-1.t ...... ok
t/numbers.t ............. 1/? Attempt to free unreferenced scalar: SV 0x814ebe0, Perl interpreter: 0x814e008 during global destructi
on.
t/numbers.t ............. ok
t/object.t .............. ok
t/perl-monks-1165399.t .. 1/? Use of uninitialized value in undef operator at t/perl-monks-1165399.t line 38.
t/perl-monks-1165399.t .. ok
t/read-file.t ........... ok
t/rfc7159.t ............. ok
t/syntax.t .............. ok
t/test-empty-string.t ... ok
t/unicode.t ............. ok
t/utf8.t ................ ok
t/valid-json.t .......... All 5 subtests passed
t/whitespace.t .......... ok

Test Summary Report
-------------------
t/valid-json.t        (Wstat: 11 Tests: 5 Failed: 0)
  Non-zero wait status: 11
  Parse errors: No plan found in TAP output
Files=16, Tests=277,  0 wallclock secs ( 0.05 usr  0.01 sys +  0.25 cusr  0.04 csys =  0.35 CPU)
Result: FAIL
Failed 1/16 test programs. 0/277 subtests failed.
make: *** [test_dynamic] Error 255
  BKB/JSON-Parse-0.48.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports BKB/JSON-Parse-0.48.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 BKB/JSON-Parse-0.48.tar.gz                   : make_test NO

Like I said, it's an old Debian Etch server which is running an old version of cpan as well:

# cpan -v
/usr/bin/cpan script version 1.9, CPAN.pm version 1.9205

Can anyone offer any tips?


Solution

  • Your errors include this:

    Warning: Perl version 5.008009 or higher required. We run 5.008008.

    The current version of JSON::Parse (0.48) requires a more recent version of Perl than the one you have.

    This minimum version requirement was added in version 0.25. But looking at the CPAN testers results, it seems that this was just documenting a problem that had been around for some time. You might be able to install version 0.18, but you would be far better advised to upgrade to a version of Debian with a newer version of Perl installed.