Date::Manip Not Installing - perl

I keep getting error messages when trying to install the Date::Manip module. Any Perl experts know what I can try?
The command I'm trying is
perl -MCPAN -e "install Date::Manip"
Perl version is 5.20 and the version of the Date::Manip it keeps trying to install is 6.45, but it comes back with "Make had some problems" and "No such file in archive". It does prompt me to manually install the file, but i have no clue on how to do that. Here's what it says...
Could not find file 'sulbeck#heather.osg.ufl.edu.2024:1399465428' in memory at C:\Strawberry\perl\lib/CPAN/Tarzip.pm line 408.
Making symbolic link 'C:\STRAWB~1\cpan\build\tmp-3576\Date-Manip6.45\lib\Date\Manip\.#Changes6.pod' to 'sulbeck#heather.osg.ufl.edu.2024:1399465428' failed at C:\Strawberry\perl\lib/CPAN/Tarzip.pm line 408.
Could not untar with Archive::Tar SBECK/Date-Manip-6.45.tar.gz
Had problems unarchiving. please build manually. Stopping: 'install' failed for 'Date:Manip

I had exactly the same problem today.
I've been able to get 6.44 installed by doing the following from within the cpan cli (you can access this by simply typing cpan in your terminal).
The developer for Date::Manip has archived previous versions of the module, you'll need to add the backpan URL into your cpan config so you can search for it.
o conf urllist push http://backpan.perl.org/
Now you should be able to install using a direct path to version 6.44
install SBECK/Date-Manip-6.44.tar.gz
I had to accept that the checksum wasn't present in the package, but after that the module seemed to install correctly.
I suspect you'll want to keep an eye on the module and this bug report so that you can upgrade once it has been fixed.

perl -MCPAN -e "install 'SBECK/Date-Manip-6.44.tar.gz'"
or wait until the distribution is fixed. '.#Changes6.pod' is an illegal filename for your tar.

Related

trouble installing perl module with cpanm

I'm trying to install Vcf.pm from CPAN and am having no luck. Part of the problem is that I can't get cpanm to work.
This is where I started:
https://metacpan.org/pod/release/AJPAGE/Bio-Pipeline-Comparison-1.123050/lib/Vcf.pm
The Install Instructions (at the lower left if that page) gives 2 options:
cpanm Vcf
and
perl -MCPAN -e shell
install Vcf
For the second option, the first line goes okay but the second line returns:
Warning: Cannot install Vcf, don't know what it is.
Trying the first option, I get:
-bash: cpanm: command not found
That is strange, because I already installed cpanminus and it seemed to go okay, and when I give this command:
cpan App:cpanminus
I get this:
App::cpanminus is up to date (1.7044).
Can anyone help me get one of the above 2 options working so I can get the module installed? I'm just a humble dilettante where computer programming is concerned, but my understanding is that cpan is supposed to make installing modules easy, so I can't believe I've managed to fail at this!
It appears that the Bio::Pipeline::Comparison distribution is not indexed by PAUSE, so CPAN does not know how to install it. It's listed on MetaCPAN, but it was released seven years ago. The GitHub repository is missing and it's not in the author's CPAN directory. The module has disappeared. You might write to the author to ask where's it's gone if you are supporting legacy code. If you are doing new work, find something else to do the job.
As for the missing cpanm, it's probably installed but not in your PATH. You can force install it to and see where it ends up:
% cpan -f App::cpan minus

How to install a missing Perl module (Net/SFTP.pm)?

I am trying to install some missing Perl modules because when I run my Perl script I am getting the error:
Can't locate Net/SFTP.pm in #INC (you may need to install the Net::SFTP module)
The first step I have taken to install this is:
I have brought up CPAN in CMD and run the command cpan> install foo but no luck because after I run the command I am getting:
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
I am on a proxy so I am wondering if there is a way round the proxy?
Another step I have taken is that I have installed strawberry Perl from http://strawberryperl.com/ but still no luck.
Lastly, I have the file 01mailrc.txt.gz locally install in my download folder but not sure how to install it.
FYI: I am on Windows. I have not used Perl before. The Perl version I use is:
This is Perl 5, version 26, subversion 1 (v5.26.1) built for MSWin32-x64-multi-thread
Could someone help me on this or show me a way around on how to install it?

Installing Params::Validate with cpan - Unable to start 'Build'

I'm trying to install Bugzilla for demo purposes on my Win8 PC using cygwin. I'm stuck at installing Perl modules, more specifically Params::Validate.
I've tried
install-module.pl Params::Validate
and with cpan:
install Params::Validate
The error message I get is following (in short):
Running Build install
Unable to start 'Build': There is no application associated with the given file name extension.
DROLSKY/Params-Validate-1.13.tar.gz
sudo ./Build install -- NOT OK
Failed during this command:
DROLSKY/Params-Validate-1.13.tar.gz : install NO
The error message is quite simple and clear, but I have absolutely no clue where to find an application which should be associated with the 'Build'-file. Google couldn't help me either. Anyone of you can?
PS. Avast moved some files to quarantine earlier during the installation. I disabled the file monitoring from Avast and re-ran the installation of those modules (at least Module::Runtime) and got response that it went OK.
Download Params-Validate-1.13.tar.gz and extract the contents to a temporary directory. Open the command line in that temporary directory and type:
perl Build.PL
This generates a file called Build. Now to actually build the module run:
./Build
Hopefully you don't get any nasty-sounding error messages. Before installing the module, let's test it works:
./Build test
Hopefully the test suite passes. Now you can install the module. You will need to run this as a user who has write permission over your Perl library directories. (On Linux/Unix machines, that might involve using sudo.) To install the module, run:
./Build install
All done.

How do I stop cpan from reconfiguring each time? + More

I'm running on a Mac (version 10.6.3) and am struggling to understand what is going on with my Perl installation.
I let the system do a copy from my previous mac, and I appear to have a second perl installed, which appears earlier in my path. I can't tell (or remember) if I might have installed it with fink, macports or CPAN or what.
type -a cpan
cpan is /opt/local/bin/cpan
cpan is /usr/bin/cpan
I'm seeing two oddities. (To start with!) When I run cpan, and let it configure in ~lcuff/.cpan, each time I run it, it wants to reconfigure, giving the message:
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters...
Also, when I try to install File::Find::Rule (so I can list my CPAN modules, per the FAQ) I end up with an error message that I can't decipher or Google a solution for:
Use of inherited AUTOLOAD for non-method Digest::SHA::shaopen() is deprecated at /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Digest/SHA.pm line 55.
Catching error: "Can't locate auto/Digest/SHA/shaopen.al in \#INC (\#INC contains: /sw/lib/perl5 /sw/lib/perl5/darwin /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 /Users/lcuff) at /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Digest/SHA.pm line 55\cJ" at /opt/local/lib/perl5/5.8.9/CPAN.pm line 359
CPAN::shell() called at /opt/local/bin/cpan line 198
I just went through my first migration to a new Mac last week, including a switch from fink and system perl to MacPorts and custom perl, so I remember the pain all too well...
As Schwern said, /opt/local is the default install location for MacPorts; fink uses /sw.
I did encounter a similar problem with CPAN configuration, although I didn't make any attempt to determine whether it was repeatable or not.
The first time I ran CPAN config, it said that I had an existing CPAN dir at ~/.cpan and stored the configuration there.
The second time, it wanted to configure into an existing CPAN dir at ~/Library/Application Support/.cpan. I didn't feel like repeating the CPAN configuration, so I broke out, did a quick cd ~/Library/Application Support/.cpan ; rm -rf .cpan ; ln -s ~/.cpan ., and it's worked great for me since then.
Hopefully this will at least help get you pointed in the right direction.
Have a look at Perlbrew.
Perlbrew allows you to install and manage mulitple versions for Perl under your home directory at ~/perl5
Installation is easy:
curl -LO http://xrl.us/perlbrew
chmod +x perlbrew
./perlbrew install
and simply follow the instructions.
Been using it for past few months on Mac OSX and it worked like a charm!
/I3az/

How can I install script distributions from CPAN?

I tried:
cpan> i /xls2csv/
No objects found of any type for argument /xls2csv/
cpan> install xls2csv
Warning: Cannot install xls2csv, don't know what it is.
Try the command
i /xls2csv/
to find objects with matching identifiers.
I haven't had any problems installing registered modules, e.g.
cpan> install DateTime
It is just the xls2csv that is providing problems.
Thank you for any insights provided.
P.S. Constrained To Windows with ActivePerl 5.10 (I think) Also I have the xls2csv-1.06.tar.gz file downloaded and tried
cpan> install C:/...path to file locally/xls2csv-1.06.tar.gz
That did not seem to work, and I must install locally.
The indexes used by CPAN.pm are all module-oriented, so they don't see distributions that contain no modules. (xls2csv has only a script.) You can still install them by giving the full path (under authors/id) of the distribution, just as you would to install older or development versions of a distribution:
cpan> install K/KE/KEN/xls2csv-1.06.tar.gz
If you are using my cpan(1) command, you can also install whatever is in the current working directory by telling it to install ".".
% cpan .
That should trigger the normal CPAN.pm process for handling dependencies and so on. You should be able to do that in the CPAN.pm shell too.
If you want to fetch the file from a CPAN mirror, you can do it as ysth suggested. You give it the path under authors/id in the repository and CPAN.pm will find it for you. You're skipping the step where it looks in the PAUSE index because you've already given it the path to download.
It's a 5 year old script with few tests (7) none on a Mac, and one bug report (a year old). It appears to not have been updated since it was written so use this script with realistic expectations. In other words, don't be surprised if you can't get it to work.