How to fix "Can't locate Archive/Tar.pm" [duplicate] - perl

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 5 years ago.
I'm trying update a software and when I running for make update I've a issue:
Can't locate Archive/Tar.pm in #INC (#INC contains: ...)
How I can fix this?

Archive::Tar has been bundled with Perl since Perl 5.10, so unless you are using an ancient version of Perl, you have a partial or corrupted install of Perl.
Some Linux distributions (e.g. Redhat) gut out lesser-used parts of Perl and provide them in an package (e.g. perl-core) that can be installed using the OS distribution's package manager.
Alternatively, Archive::Tar is available for install separately from Perl —it is "dual-lived"— so you can install it from CPAN.

Related

Undefined subroutine &URL [duplicate]

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 3 years ago.
I am running perl script to check whether the IP is present or not. I am getting the error in script.
Perl script: I used
use URL::Encode;
library, but it threw the below error:
Can't locate URL/Encode.pm in #INC (#INC contains: C:\Strawberry\perl\lib\CPAN C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .)
So I used direct path as below:
use lib 'C:\Strawberry\perl\lib\CPAN';
my $json_hash={};
$json_hash->{'username'}=$username;
$json_hash->{'response'}=$response;
$json_hash->{'control'}=$control;
my $json_query=URL::Encode::url_encode(JSON::to_json($json_hash));
Suggest me any alternate library or a way to use this library
The code you posted doesn't result in the error you are getting. Your program surely has use URL::Encode; or similar.
There's no point in adding a path to #INC that's already in #INC, so your solution is useless.
The correct fix is to install the missing modules.
You're using an older version of Perl. You might want to consider upgrading. (The message in question has been updated to include the useful hint that you may need need to install the module.)

How to install CPAN modules on mageia 4 [duplicate]

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 8 years ago.
How to install CPAN modules on mageia 4? I am struggling to find out to achieve this.
any help is appreciated..
First you probably don't need to, just install the package.
For example perl-WWW-Mechanize is the one for WWW::Mechanize.
You should use rpmdrake or urpmi to find the package providing the module you want.
$ urpmf --provides --literal 'perl(WWW::Mechanize)'
perl-WWW-Mechanize:perl(WWW::Mechanize)[== 1.730.0]
If you want to be able to use the cpan command, you need to install perl-devel package.

Why can't I install the Perl PAR::Packer module? [duplicate]

This question already has answers here:
How to install pp (PAR Packager)?
(6 answers)
Closed 8 years ago.
I am trying to convert my perl scripts into executable files for Windows. The executable file should include all modules, too.
I am trying to install PAR Packer using ppm but I get an error message :
"ppm install failed: Can't find any package that provides PAR::Packer"
code:
ppm install PAR::Packer
How to make pp work which is present in PAR::Packer?
Else, is there any other module / free software to convert Perl to exe?
It looks to me that there is no PPM package for PAR::Packer.
You're using ActivePerl which makes its own PPM packages which are a subset of the full range of CPAN modules available.
See this answer for more: How to install pp (PAR Packager)?
I found that using CPAN alone was not enough to get PAR::Packer installed on my version of Perl (Perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread) on Windows 7. To get the module installed I first had to install Win32::Exe via the ActiveState PPM, then switch and install the PAR::Packer module with CPAN.

Perl Got error when use pp -o test.pl [duplicate]

This question already has answers here:
Perl Install PAR:Packer Problems
(3 answers)
Closed 8 years ago.
I tried to convert perl program to exe file. My perl version is 5.16.2 on my Windows 7 64bit, I use ppm install PAR:Packer, version 1.013, But when I use pp -o test.pl, I got the error:
Perl lib version (5.16.2) doesn't match executable version (v5.16.0).
I have googled extensively, but as of yet haven't been able to find a solution, any help is greatly appreciated, thanks a lot!
The build machine where you generated perl executable has the perl version 5.16.0. This perl executable can in turn spawn another perl script. This newly spawned perl script will use the perl 5.16.2 library installed in the host machine thereby leading to the conflict.
PP unpacks the perl executable in the host machine before executing them. If you can prepend your PATH environment variable to that path then PP finds 5.16.0 perl library instead of perl library installed in the host system.

Read pdf in perl CAM::PDF [duplicate]

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 9 years ago.
I want to install perl module CAM::PDF for Linux. Can somebody please suggest that how can this be done? I was unable to find any place where I could download this module from.
I was unable to find any place where I could download this module from
HOW???
This module available on CPAN.
Try cpanp install CAM-PDF