Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Can't install JSON::XS ???? Pleasehelp

    Hello, well I'm trying to install the shodan library

    Have issues It won't install JSON::XS

    'sudo perl -MCPAN -e 'install JSON::XS'

    Checking if your kit is complete...
    Looks good
    Writing Makefile for JSON::XS
    Writing MYMETA.yml
    cp XS/ blib/lib/JSON/XS/
    cp blib/lib/JSON/
    /usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp  -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap  XS.xs > XS.xsc && mv XS.xsc XS.c
    cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"2.33\" -DXS_VERSION=\"2.33\" -fPIC "-I/usr/lib/perl/5.14/CORE"   XS.c
    /bin/sh: 1: cc: not found
    make: *** [XS.o] Error 127
      /usr/bin/make -- NOT OK
    'YAML' not installed, will not store persistent state
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    Any ideas?

    Also how do I install curl?

    'curl -OL' didn't work so I just used wget hope it's the same.

    I'm a utter noob. If someone could help me I can reward them 20-50$ via PayPal/LR

  2. #2
    Hello and welcome!

    If I were you, I'd install Perl packages from the system's software sources, whenever possible. For the JSON::XS Perl module, you can install it like this:

    sudo apt-get install libjson-xs-perl
    To test that it works, run this:
    perl -e 'use JSON::XS'
    If the command returns nothing, it worked and the module is installed.

    To install curl, simply do:
    sudo apt-get install curl
    BTW, you are missing the GNU C compiler, that is why the cpan command fails. Install it:

    sudo apt-get install build-essential
    then make sure you can find the binary:
    gcc --version
    Unfortunately, I don't see Shodan itself in the apt sources, so you'll have to try the cpan command to build it, as you originally tried. A binary package might be in a PPA though, haven't looked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts