installing mod manually

L

lucas

I'm having trouble installing Math::pari. I found out that it's because the
Makefile.PL that comes in the package doesn't use passive mode for FTP, and
I need to use passive. I've been trying to install with the mod CPAN, but
of course this wont work because of the above. How can I install a module
by hand?

I downloaded the correct file I needed, unpacked it, fixed the ftp get
section to make it use passive mode, and it all worked fine. a Makefile
was created, but it installs into the currect directory, and I need it to
go into my perl directory (/usr/local/lib/perl5)

thx
 
J

James Willmore

I'm having trouble installing Math::pari. I found out that it's
because the Makefile.PL that comes in the package doesn't use
passive mode for FTP, and I need to use passive. I've been trying
to install with the mod CPAN, but of course this wont work because
of the above. How can I install a module by hand?

I downloaded the correct file I needed, unpacked it, fixed the ftp
get section to make it use passive mode, and it all worked fine. a
Makefile was created, but it installs into the currect directory,
and I need it to go into my perl directory (/usr/local/lib/perl5)

perl Makefile.PL PREFIX=/usr/local
make
make test
su (if you're not root already)
make install

You *may* want to double check the PREFIX. I always seem to screw
that up. But, in this case, I'm pretty sure it's right.

Also, Math::pari is different from other modules in this respect - if
it can't find the pari distro, it will download it for you. If this
is where you're getting hosed up, look in the README or INSTALL
file(s) for further directions. It's been awhile, but I think the
author gives some pretty clear directions on what to do if that's the
case.

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
7:30, Channel 5: The Bionic Dog (Action/Adventure) The Bionic
Dog drinks too much and kicks over the National Redwood Forest.
 
L

lucas

Thanks ;)
I thought about using the 'prefix' paramater, but didn't turns out it worked
fine. I didn't find anything in the readme or install files about problems
with ftp. So, if anybody wants to know what I did to get around the ftp
requiring PASV to work properly, here you go:
Download the package (Math-Pari-2.010500.tar.gz)
unpack
edit ./Math-Pari-2.010500/utils/Math/PariBuild.pm
and modify: $ftp = Net::FTP->new($host) or die "Cannot create FTP object:
$!";
to: $ftp = Net::FTP->new($host, Passive => 1) or die "Cannot create FTP
object: $!";

Save file, run ./Math-Pari-2.010500/Makefile.pl prefix=/usr/local/lib/perl5
or wherever your perl directory is
the Makefile will download another gzip file and compile the C code (some of
it is in C), and install to your perl directory.

Thanks again Jim
 
J

James Willmore

Thanks ;)
I thought about using the 'prefix' paramater, but didn't turns out
it worked fine. I didn't find anything in the readme or install
files about problems with ftp. So, if anybody wants to know what I
did to get around the ftp requiring PASV to work properly, here you
go: Download the package (Math-Pari-2.010500.tar.gz)
unpack
edit ./Math-Pari-2.010500/utils/Math/PariBuild.pm
and modify: $ftp = Net::FTP->new($host) or die "Cannot create FTP
object: $!";
to: $ftp = Net::FTP->new($host, Passive => 1) or die "Cannot create
FTP object: $!";

Save file, run ./Math-Pari-2.010500/Makefile.pl
prefix=/usr/local/lib/perl5 or wherever your perl directory is
the Makefile will download another gzip file and compile the C code
(some of it is in C), and install to your perl directory.

Thanks again Jim

You're welcome. And, have you emailed the author so this modification
is available to all?

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
"Pascal is Pascal is Pascal is dog meat." -- M. Devine and P.
Larson, Computer Science 340
 
L

lucas

James Willmore wrote:

You're welcome. And, have you emailed the author so this modification
is available to all?

Been off on holidays, away from this computer, but that sounds like a plan.
I'll send one out
 
J

James Willmore

James Willmore wrote:



Been off on holidays, away from this computer, but that sounds like
a plan. I'll send one out

As I type, I have been home now a total of 60 minutes. I don't think
it's critical that it be sent out *right now* :)

Enjoy!

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Fuch's Warning: If you actually look like your passport photo,
you aren't well enough to travel.
 
L

lucas

I've emailed the author, and here's what he wrote:

---
As documented, auto-install requires working Net::*. Yours is not
working. You need PASSIVE_FTP (sp?) to be set.

Thanks for the way to turn passive FTP on programmatically. I have it
in my TODO list to retry with PASSIVe on if the default connect fails.
No ETA, though.
---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top