How to install module when I am not allowed to install moudule in system directory?

Z

zaifengwang

I want to install module PDF::API2 under the environment of campus
network - the administor does not allow me install this module
system-wide.

I used "PPM>set root u:\mydirectory" and "PPM>set build
u:\mydirectory" to tell PPM that I want to install the module in my
private directory, the result is as following:
"unknown or ambiguous setting 'root'/'build'. see help setting".

I appreciate very much if you can help me out with this question.

James
 
M

Matt Garrish

I want to install module PDF::API2 under the environment of campus
network - the administor does not allow me install this module
system-wide.

I used "PPM>set root u:\mydirectory" and "PPM>set build
u:\mydirectory" to tell PPM that I want to install the module in my
private directory, the result is as following:
"unknown or ambiguous setting 'root'/'build'. see help setting".

Did you just make those settings up? I've never seen/heard of any root
or build settings in ppm. Have a look at the documentation:

http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/ActivePerl-faq2.html

You'll need to go to the cpan shell if you want to build in a specific
directory. PPM does have a target option, but that just allows you to
pick a Perl distro to install the module for if you have multiple
versions on your machine.
 
B

Brett.R.Davis

If you download the package manually, you can do it this way:

perl Makefile.PL PREFIX=/home/username/usr/local
make
make install
make test

This installs the package in your home direcotory, this implies that
you need to set the PERL5LIB variable which sets your user defined
include paths so that you can find it when you "use" the module.
 
J

Jürgen Exner

I want to install module PDF::API2 under the environment of campus
network - the administor does not allow me install this module
system-wide.

Your Question is Asked Frequently: "perldoc -q module":

How do I keep my own module/library directory?

jue
 
P

pegasus

First of all, thanks a lot for you guys' help, but the problem is still
open...

To Matt:

As you predicted, those settings didn't work. I saw those settings from
the book "SAMS Teach Yourself Perl in 24 hours" Appendix A P431. In
fact, there are not such settings when I consult the "perldoc set". Is
there something wrong with this book? confusing.

I am under Windows so it's nothing to do with CPAN, I think.

To Brett:

Thanks for your information but I am in Windows instead of Unix so I
don't think your method will work.

To Jue:

Before I posted I have checked this FAQ but still it considered only
Unix environment rather than Windows, So I don't think that FAQ can
help me with this problem.
 
J

Jürgen Exner

[I'm not going to recreate the right thread with follow-ups and answers for
your reply]

pegasus wrote:
[In the context of how to install a module in a custom directory being
pointed to the FAQ "How do I keep my own module/library directory?"]
Before I posted I have checked this FAQ but still it considered only
Unix environment rather than Windows, So I don't think that FAQ can
help me with this problem.

I may be wrong but I don't see anything in that FAQ that would be
Unix-specific.

jue
 
M

Matt Garrish

pegasus wrote:

[please don't top post]
As you predicted, those settings didn't work. I saw those settings from
the book "SAMS Teach Yourself Perl in 24 hours" Appendix A P431. In
fact, there are not such settings when I consult the "perldoc set". Is
there something wrong with this book? confusing.

Yes, most SAMS books aren't worth the paper they're printed on.
I am under Windows so it's nothing to do with CPAN, I think.

There's nothing stopping you from using the CPAN shell on windows. CPAN
is the real Perl archive, ppm is just activestate's own package manager
and though the modules they provide are tested to work on Windows
they're often old and limited in number. I'm assuming that you have a
local account into this environment and can configure the shell to
install where you want. If not, then it will install to the default
Perl directories and if those are off-limits to you then you'll
probably run into problems.

[referencing make in another post]
Thanks for your information but I am in Windows instead of Unix so I
don't think your method will work.

Again, there are versions of make available for Windows. If you don't
have access to the CPAN shell or can't congifure it to build locally in
this environment you can always try building the modules on your own
computer and uploading them. This method is fraught with problems
though, as you may not have permission to run any compiled code that
goes along with the module and unless your environment and the remote
environment are identical you'll likely run into other bugs.

[reference to How do I keep my own module/library directory?]
Before I posted I have checked this FAQ but still it considered only
Unix environment rather than Windows, So I don't think that FAQ can
help me with this problem.

Perl is Perl. What works on Unix generally works on Windows.

Matt
 
M

Matt Garrish

pegasus wrote:

[please don't top post]
As you predicted, those settings didn't work. I saw those settings from
the book "SAMS Teach Yourself Perl in 24 hours" Appendix A P431. In
fact, there are not such settings when I consult the "perldoc set". Is
there something wrong with this book? confusing.

Yes, most SAMS books aren't worth the paper they're printed on.
I am under Windows so it's nothing to do with CPAN, I think.

There's nothing stopping you from using the CPAN shell on windows. CPAN
is the real Perl archive, ppm is just activestate's own package manager
and though the modules they provide are tested to work on Windows
they're often old and limited in number. I'm assuming that you have a
local account into this environment and can configure the shell to
install where you want. If not, then it will install to the default
Perl directories and if those are off-limits to you then you'll
probably run into problems.

[referencing make in another post]
Thanks for your information but I am in Windows instead of Unix so I
don't think your method will work.

Again, there are versions of make available for Windows. If you don't
have access to the CPAN shell or can't congifure it to build locally in
this environment you can always try building the modules on your own
computer and uploading them. This method is fraught with problems
though, as you may not have permission to run any compiled code that
goes along with the module and unless your environment and the remote
environment are identical you'll likely run into other bugs.

[reference to How do I keep my own module/library directory?]
Before I posted I have checked this FAQ but still it considered only
Unix environment rather than Windows, So I don't think that FAQ can
help me with this problem.

Perl is Perl. What works on Unix generally works on Windows.

Matt
 
P

pegasus

If you download the package manually, you can do it this way:

perl Makefile.PL PREFIX=/home/username/usr/local
make
make install
make test

This installs the package in your home direcotory, this implies that
you need to set the PERL5LIB variable which sets your user defined
include paths so that you can find it when you "use" the module.
 
P

pegasus

To Brett:
perl Makefile.PL PREFIX=/home/username/usr/local
make
make install
make test

Must those commands be executed in Unix? I downloaded this package,
it's a file like "PDF-API2-0.55.tar.tar", I used "extract here" command
twice to find "Makefile.PL". but when I tried to execute the mentioned
commands in Windows, I failed. Do you think I can execute these
commands in Windows?

To all:

I tried to execute CPAN in windows by typing "perl -MCPAN -e shell" but
I failed. but it works in Linux. But still I can't install a module by
the command "o conf makepl_arg PREFIX="/mydic/perl/lib"". confusing.

I wonder how can use CPAN shell in Windows? what's the command?

Please forgive my ignorance.
 
P

Paul Lalli

pegasus said:
I tried to execute CPAN in windows by typing "perl -MCPAN -e shell" but
I failed.

That error description is not helpful. HOW did it fail? What error
message did you see? What output did you see?
but it works in Linux. But still I can't install a module by
the command "o conf makepl_arg PREFIX="/mydic/perl/lib""

That command does not install any module. It sets the arguments for
the `perl Makefile.PL` command that cpan runs for you.
. confusing.

I wonder how can use CPAN shell in Windows? what's the command?

perl -MCPAN -e "shell"
works fine for me (note the quotes).

But as others have said, you will need a Windows version of 'make' in
order for CPAN to do anything for you.

Paul Lalli
 
P

pegasus

To Paul Lalli:

I typed <perl -MCPAN -e "shell"> or <perl -MCPAN -e shell> in windows,
it respond:
Cannot open >C:\Perl\lib\CPAN\Config.pm at c:/Perl/lib/CPAN.pm line
1162"

It seems that it doesn't work here. Any advisory?
 
P

Paul Lalli

pegasus said:
To Paul Lalli:

I typed <perl -MCPAN -e "shell"> or <perl -MCPAN -e shell> in windows,
it respond:
Cannot open >C:\Perl\lib\CPAN\Config.pm at c:/Perl/lib/CPAN.pm line
1162"

It seems that it doesn't work here. Any advisory?

Your installation of Perl seems very broken. I advise reinstalling it.

Paul Lalli
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top