Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, well I'm trying to install the shodan library docs.shodanhq.com/perl/tutorial.html Have issues It won't install JSON::XS 'sudo perl -MCPAN -e 'install JSON::XS' Code: Checking if your kit is complete... Looks ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    1

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


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


    docs.shodanhq.com/perl/tutorial.html

    Have issues It won't install JSON::XS

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

    Code:
    Checking if your kit is complete...
    Looks good
    Writing Makefile for JSON::XS
    Writing MYMETA.yml
    cp XS/Boolean.pm blib/lib/JSON/XS/Boolean.pm
    cp XS.pm blib/lib/JSON/XS.pm
    /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
      MLEHMANN/JSON-XS-2.33.tar.gz
      /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 github.com/downloads/achillean/shodan-perl/Shodan-0.3.tar.gz' 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
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    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:

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

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

    Code:
    sudo apt-get install build-essential
    then make sure you can find the binary:
    Code:
    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
  •