Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8402663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:07:45+00:00 2026-06-09T22:07:45+00:00

How to install all dependencies of the module Nmap::Scanner with cpan in Perl? I

  • 0

How to install all dependencies of the module Nmap::Scanner with cpan in Perl? I did, cpan Nmap::Scanner. But, needing other dependencies for module.

  #!/bash/perl

  use Nmap::Scanner;
  my $scan = Nmap::Scanner->new();
  
  $scan->add_target('localhost');
  $scan->add_target('host.i.administer');
  $scan->add_scan_port('1-1024');
  $scan->add_scan_port('31337');
  $scan->tcp_syn_scan();
  $scan->noping();
  
  my $results = $scan->scan();
  
  my $hosts = $results->gethostlist();
  
  while (my $host = $hosts->get_next()) {
  
      print "On " . $host->hostname() . ": \n";
  
      my $ports = $host->get_port_list();
  
      while (my $port = $ports->get_next()) {
          print join(' ',
              'Port',
              $port->service() . '/' . $port->portid(),
              'is in state',
              $port->state(),
              "\n"
          );
      }
  
  }

I did, but when running the script in perl, shows this in console.

Can't locate XML/SAX/Exception.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl` /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /usr/local/share/perl5/XML/SAX/ParserFactory.pm line 12.
BEGIN failed--compilation aborted at /usr/local/share/perl5/XML/SAX/ParserFactory.pm line 12.
Compilation failed in require at /usr/local/share/perl5/Nmap/Scanner/Backend/XML.pm line 8.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nmap/Scanner/Backend/XML.pm line 8.
Compilation failed in require at /usr/local/share/perl5/Nmap/Scanner/Scanner.pm line 4.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nmap/Scanner/Scanner.pm line 4.
Compilation failed in require at /usr/local/share/perl5/Nmap/Scanner.pm line 10.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nmap/Scanner.pm line 10.
Compilation failed in require at e1-insecure.pl line 3.
BEGIN failed--compilation aborted at e1-insecure.pl line 3.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:07:47+00:00Added an answer on June 9, 2026 at 10:07 pm

    cpan resolves dependencies automatically. To install execute the following command:

    cpan Nmap::Scanner
    

    An alternative installer for CPAN modules is cpanminus. Using cpanm:

    cpanm Nmap::Scanner
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've installed Aptana 1.5 today but after the install all my SVN projects give
All, Atlast had our admin install the PEAR SOAP module on our apache server.
I am writing Catalyst application which uses Module::Install for module building. I keep all
I want to install File::Fetch, which is a core module in Perl 5.12, in
I'm trying to install the Test::Continuous Perl module on my MacBook Pro with Snow
I would like to be able to install all of the NuGet packages in
I'm new To android ecosystem. Do I really need to install all the SDK
I installed Boost via sudo apt-get install libboost-all-dev on the most recent version of
I have been trying to install ReviewBoard and all looks like it has gone
I am writing an install script that installs all tables, stored procedures, views, full

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.