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

Discussion in 'Perl Misc' started by zaifengwang@gmail.com, Aug 18, 2006.

  1. Guest

    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
     
    , Aug 18, 2006
    #1
    1. Advertising

  2. Matt Garrish Guest

    wrote:

    > 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.
     
    Matt Garrish, Aug 18, 2006
    #2
    1. Advertising

  3. Guest

    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.

    wrote:
    > 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
     
    , Aug 18, 2006
    #3
  4. wrote:
    > 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
     
    Jürgen Exner, Aug 18, 2006
    #4
  5. pegasus Guest

    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.


    Matt Garrish wrote:
    > wrote:
    >
    > > 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.
     
    pegasus, Aug 19, 2006
    #5
  6. [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
     
    Jürgen Exner, Aug 19, 2006
    #6
  7. Matt Garrish Guest

    pegasus wrote:

    [please don't top post]

    > Matt Garrish wrote:
    > > wrote:
    > >
    > > > 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".
    > > >

    > >
    > > 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.

    >
    > 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
     
    Matt Garrish, Aug 19, 2006
    #7
  8. Matt Garrish Guest

    pegasus wrote:

    [please don't top post]

    > Matt Garrish wrote:
    > > wrote:
    > >
    > > > 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".
    > > >

    > >
    > > 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.

    >
    > 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
     
    Matt Garrish, Aug 19, 2006
    #8
  9. pegasus Guest

    wrote:
    > 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.
    >
    > wrote:
    > > 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
     
    pegasus, Aug 20, 2006
    #9
  10. pegasus Guest

    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.

    wrote:
    > 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.
    >
    > wrote:
    > > 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
     
    pegasus, Aug 20, 2006
    #10
  11. Matt Garrish Guest

    pegasus wrote:

    [please stop top-posting]

    > wrote:
    > > 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
    > >

    >
    > Must those commands be executed in Unix?


    http://msdn2.microsoft.com/en-us/library/dd9y37ha.aspx

    If you don't have it available, you're going to have to get your admin
    to install it. If your admin won't install it then it sounds like you
    need to find another environment to work in.

    Matt
     
    Matt Garrish, Aug 20, 2006
    #11
  12. Paul Lalli Guest

    pegasus wrote:
    > 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
     
    Paul Lalli, Aug 20, 2006
    #12
  13. pegasus Guest

    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?

    Paul Lalli wrote:
    > pegasus wrote:
    > > 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
     
    pegasus, Aug 20, 2006
    #13
  14. Paul Lalli Guest

    pegasus wrote:
    > 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
     
    Paul Lalli, Aug 20, 2006
    #14
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Franks
    Replies:
    11
    Views:
    27,995
    JeanCastNet
    Jun 10, 2010
  2. perseus
    Replies:
    5
    Views:
    328
    Thomas Matthews
    Aug 12, 2003
  3. Nathan Sokalski
    Replies:
    2
    Views:
    1,149
  4. Lisa Ngo
    Replies:
    3
    Views:
    490
    Jan Tielens
    Jan 18, 2004
  5. Iñaki Baz Castillo
    Replies:
    13
    Views:
    540
    Iñaki Baz Castillo
    May 1, 2011
Loading...

Share This Page