Professional Web Applications Themes

Local install of modules - no root; no telnet - PERL Modules

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I know this has been beaten to death, and I've scoured the groups and numerous sites. Found hundreds of 'solutions', but they all assume I have root access or telnet access, which I don't. I'm attempting to install Date::Calc on the server where my scripts are - note I didn't say 'my server', since I don't want to confuse anyone to thinking I have root access. It's some flavour of Linux. I've installed other modules using a perl script I wrote, which has worked in the past. Sometimes I've had to do some directory ...

  1. #1

    Default Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    I know this has been beaten to death, and I've scoured the groups and numerous sites. Found hundreds
    of 'solutions', but they all assume I have root access or telnet access, which I don't.

    I'm attempting to install Date::Calc on the server where my scripts are - note I didn't say 'my
    server', since I don't want to confuse anyone to thinking I have root access. It's some flavour of
    Linux.

    I've installed other modules using a perl script I wrote, which has worked in the past. Sometimes
    I've had to do some directory renaming and some file moving, but somehow managed to get things working.

    Except for Date::Calc. I cannot get my test script to run - it tells me it 'Can't locate loadable
    object for module Date::Calc in INC (INC contains: /home/softouch/public_html/cgi-bin/PerlMods
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at test_date.pl line 20'

    In my test script I do:
    use lib qw(/home/softouch/public_html/cgi-bin/PerlMods);
    use Date::Calc;

    but this always results in the error message.

    When I run my install script, this is the output I get:
    This script is running in: /home/softouch/public_html/cgi-bin

    Copying *.gz to PerlMods ..
    We are in the /home/softouch/public_html/cgi-bin directory
    Now installing each module under PerlMods ...
    Now making directory under PerlMods ...
    Module is: Date-Calc-5.4.tar.gz
    Module is now: Date-Calc-5.4.tar
    Date-Calc-5.4.tar found
    Now running 'tar' ...
    We are now in /home/softouch/public_html/cgi-bin/PerlMods/Date-Calc-5.4
    Writing Makefile for Date::Calc
    Writing patchlevel.h for /usr/bin/perl (5.008)
    gcc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing
    - -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe
    - -march=i386 -mcpu=i686 -DVERSION=\"5.4\" -DXS_VERSION=\"5.4\" -fPIC
    "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" Calc.c
    gcc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing
    - -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe
    - -march=i386 -mcpu=i686 -DVERSION=\"5.4\" -DXS_VERSION=\"5.4\" -fPIC
    "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" DateCalc.c
    Running Mkbootstrap for Date::Calc ()
    chmod 644 Calc.bs
    rm -f blib/arch/auto/Date/Calc/Calc.so
    LD_RUN_PATH="" gcc -shared -L/usr/local/lib Calc.o DateCalc.o -o blib/arch/auto/Date/Calc/Calc.so
    chmod 755 blib/arch/auto/Date/Calc/Calc.so
    cp Calc.bs blib/arch/auto/Date/Calc/Calc.bs
    chmod 644 blib/arch/auto/Date/Calc/Calc.bs
    Manifying blib/man3/Date::Calc::Object.3pm
    Manifying blib/man3/Date::Calc.3pm
    Manifying blib/man3/Date::Calendar.3pm
    Manifying blib/man3/Date::Calendar::Profiles.3pm
    Manifying blib/man3/Date::Calendar::Year.3pm

    All done!
    ++++++++++++++++++++++++++++++

    The install script reads this from a config file:
    PREFIX=/home/softouch/public_html/cgi-bin/PerlMods \
    INSTALLPRIVLIB=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5 \
    INSTALLSCRIPT=/home/softouch/public_html/cgi-bin/PerlMods/bin \
    INSTALLSITELIB=/home/softouch/public_html/cgi-bin/PerlMod/perl5/site_perl \
    INSTALLBIN=/home/softouch/public_html/cgi-bin/PerlMods/bin \
    INSTALLMAN1DIR=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5/man \
    INSTALLMAN3DIR=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5/man/man3

    Is it possible to get this (and other modules) working without root / telnet access? I would truly
    appreciate some light here - I'm completely stumped and frustrated.
    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGQTXgACgkQ3RxspxLYVsX9JgCgkUNi6MF3ku tut2r9T0oHvbUD
    p38AnjY7YGDcJ6HedxSnSKIcIe3csO/t
    =JTjc
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  2. #2

    Default Re: Local install of modules - no root; no telnet

    Amer Neely wrote:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > I know this has been beaten to death, and I've scoured the groups and
    > numerous sites. Found hundreds
    > of 'solutions', but they all assume I have root access or telnet access,
    > which I don't.
    >
    > I'm attempting to install Date::Calc on the server where my scripts are
    > - note I didn't say 'my
    > server', since I don't want to confuse anyone to thinking I have root
    > access. It's some flavour of
    > Linux.
    >
    > I've installed other modules using a perl script I wrote, which has
    > worked in the past. Sometimes
    > I've had to do some directory renaming and some file moving, but somehow
    > managed to get things working.
    >
    > Except for Date::Calc. I cannot get my test script to run - it tells me
    > it 'Can't locate loadable
    > object for module Date::Calc in INC (INC contains:
    > /home/softouch/public_html/cgi-bin/PerlMods
    > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    > /usr/lib/perl5/site_perl/5.8.0
    > /usr/lib/perl5/site_perl
    > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    > /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at
    > test_date.pl line 20'
    >

    It can't find Calc.so which is one of the files that gets built and
    installed when you build and install Date::Calc. Where is it ?
    > In my test script I do:
    > use lib qw(/home/softouch/public_html/cgi-bin/PerlMods);
    > use Date::Calc;
    >
    If Calc.so were in the
    /home/softouch/public_html/cgi-bin/PerlMods/auto/Date/Calc/ folder, then
    all should be ok.

    Have you built and installed any other modules whose source contains an
    '.xs' file ?

    Cheers,
    Rob

    --
    To reply by email u have to take out the u in kalinaubears.

    Sisyphus Guest

  3. #3

    Default Re: Local install of modules - no root; no telnet

    Sisyphus wrote:
    > If Calc.so were in the
    > /home/softouch/public_html/cgi-bin/PerlMods/auto/Date/Calc/ folder, then
    > all should be ok.
    I'd also recommend that one always build Calc.so with the same
    platform/environment used on the hosting server:
    - Same operating system
    - Same version of Perl
    - Same C compiler
    - Same hardware (32-bit vs. 64-bit)

    Writing a simple Perl CGI script to dump out the contents of the 'Config
    'module data would be very helpful.

    Regards,
    Bill K.
    Bill Karwin Guest

  4. #4

    Default Re: Local install of modules - no root; no telnet

    Bill Karwin wrote:
    > Sisyphus wrote:
    >
    >> If Calc.so were in the
    >> /home/softouch/public_html/cgi-bin/PerlMods/auto/Date/Calc/ folder,
    >> then all should be ok.
    >
    >
    > I'd also recommend that one always build Calc.so with the same
    > platform/environment used on the hosting server:
    > - Same operating system
    > - Same version of Perl
    > - Same C compiler
    > - Same hardware (32-bit vs. 64-bit)
    >
    Yes - that's good advice.
    My (mis?)understanding is that, in this instance, those 4 conditions
    will be satisified because Date::Calc is being built on the hosting
    server (albeit without root privileges).

    Cheers.
    Rob

    --
    To reply by email u have to take out the u in kalinaubears.

    Sisyphus Guest

  5. #5

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Sisyphus wrote:

    | Amer Neely wrote:
    |
    |> -----BEGIN PGP SIGNED MESSAGE-----
    |> Hash: SHA1
    |>
    |> I know this has been beaten to death, and I've scoured the groups and
    |> numerous sites. Found hundreds
    |> of 'solutions', but they all assume I have root access or telnet
    |> access, which I don't.
    |>
    |> I'm attempting to install Date::Calc on the server where my scripts
    |> are - note I didn't say 'my
    |> server', since I don't want to confuse anyone to thinking I have root
    |> access. It's some flavour of
    |> Linux.
    |>
    |> I've installed other modules using a perl script I wrote, which has
    |> worked in the past. Sometimes
    |> I've had to do some directory renaming and some file moving, but
    |> somehow managed to get things working.
    |>
    |> Except for Date::Calc. I cannot get my test script to run - it tells
    |> me it 'Can't locate loadable
    |> object for module Date::Calc in INC (INC contains:
    |> /home/softouch/public_html/cgi-bin/PerlMods
    |> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    |> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    |> /usr/lib/perl5/site_perl/5.8.0
    |> /usr/lib/perl5/site_perl
    |> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    |> /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at
    |> test_date.pl line 20'
    |>
    |
    |
    | It can't find Calc.so which is one of the files that gets built and
    | installed when you build and install Date::Calc. Where is it ?
    |
    | > In my test script I do:
    | > use lib qw(/home/softouch/public_html/cgi-bin/PerlMods);
    | > use Date::Calc;
    | >
    |
    | If Calc.so were in the
    | /home/softouch/public_html/cgi-bin/PerlMods/auto/Date/Calc/ folder, then
    | all should be ok.
    |
    | Have you built and installed any other modules whose source contains an
    | '.xs' file ?
    |
    | Cheers,
    | Rob
    |
    Hi, and thanks for the speedy and informative response. Yes, I had zeroed in on calc.so myself as
    the culprit, but in the output of the make process I noticed this line:
    rm -f blib/arch/auto/Date/Calc/Calc.so

    I've gone through the process several times, and I do recall seeing Calc.so sometimes but with 0
    bytes. Changing my configuration from 'LIB=' to 'PREFIX=' is the only change I make.

    When all is said and done, these are the only calc.* files in the top level directory (Date-Calc-5.4)

    - -rw-r--r-- 1 softouch softouch 0 Nov 9 04:12 Calc.bs
    - -rw-r--r-- 1 softouch softouch 58693 Nov 9 03:22 Calc.c
    - -rw-r--r-- 1 softouch softouch 267956 Nov 9 04:12 Calc.o
    - -r--r--r-- 1 softouch softouch 8353 Oct 3 08:16 Calc.pm
    - -r--r--r-- 1 softouch softouch 97507 Oct 3 08:16 Calc.pod
    - -r--r--r-- 1 softouch softouch 34579 Oct 3 08:16 Calc.xs

    I can't recall if I've ever done other installs with '.xs' files.

    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGQ5dUACgkQ3RxspxLYVsWOdQCglDYQA0Caxs fvcJApMIG1kCFK
    lToAn1aeOZuDHys9XBp7Z0fDnpufSgNK
    =9RwG
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  6. #6

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Sisyphus wrote:

    | Bill Karwin wrote:
    |
    |> Sisyphus wrote:
    |>
    |>> If Calc.so were in the
    |>> /home/softouch/public_html/cgi-bin/PerlMods/auto/Date/Calc/ folder,
    |>> then all should be ok.
    |>
    |>
    |>
    |> I'd also recommend that one always build Calc.so with the same
    |> platform/environment used on the hosting server:
    |> - Same operating system
    |> - Same version of Perl
    |> - Same C compiler
    |> - Same hardware (32-bit vs. 64-bit)
    |>
    |
    | Yes - that's good advice.
    | My (mis?)understanding is that, in this instance, those 4 conditions
    | will be satisified because Date::Calc is being built on the hosting
    | server (albeit without root privileges).
    |
    | Cheers.
    | Rob
    |

    I'll try and get the content of Config.pm then. Thanks to both of you.
    One thought, even if Calc.so were to have 0 bytes, would that make any difference in being able to
    run the module? As long as it was where it's supposed to be?

    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGQ5ocACgkQ3RxspxLYVsUzXQCfTDgZInCHHV +aTOrEuFClJ1P/
    MNQAn1N1balh7muZBbsWPcX/qKRC9Mt5
    =Amz9
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  7. #7

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Amer Neely wrote:

    | I know this has been beaten to death, and I've scoured the groups and
    | numerous sites. Found hundreds
    | of 'solutions', but they all assume I have root access or telnet access,
    | which I don't.
    |
    | I'm attempting to install Date::Calc on the server where my scripts are
    | - note I didn't say 'my
    | server', since I don't want to confuse anyone to thinking I have root
    | access. It's some flavour of
    | Linux.
    |
    | I've installed other modules using a perl script I wrote, which has
    | worked in the past. Sometimes
    | I've had to do some directory renaming and some file moving, but somehow
    | managed to get things working.
    |
    | Except for Date::Calc. I cannot get my test script to run - it tells me
    | it 'Can't locate loadable
    | object for module Date::Calc in INC (INC contains:
    | /home/softouch/public_html/cgi-bin/PerlMods
    | /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    | /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    | /usr/lib/perl5/site_perl/5.8.0
    | /usr/lib/perl5/site_perl
    | /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    | /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at
    | test_date.pl line 20'
    |
    | In my test script I do:
    | use lib qw(/home/softouch/public_html/cgi-bin/PerlMods);
    | use Date::Calc;
    |
    | but this always results in the error message.
    |
    | When I run my install script, this is the output I get:
    | This script is running in: /home/softouch/public_html/cgi-bin
    |
    | Copying *.gz to PerlMods ..
    | We are in the /home/softouch/public_html/cgi-bin directory
    | Now installing each module under PerlMods ...
    | Now making directory under PerlMods ...
    | Module is: Date-Calc-5.4.tar.gz
    | Module is now: Date-Calc-5.4.tar
    | Date-Calc-5.4.tar found
    | Now running 'tar' ...
    | We are now in /home/softouch/public_html/cgi-bin/PerlMods/Date-Calc-5.4
    | Writing Makefile for Date::Calc
    | Writing patchlevel.h for /usr/bin/perl (5.008)
    | gcc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
    | -fno-strict-aliasing
    | -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
    | -I/usr/include/gdbm -O2 -g -pipe
    | -march=i386 -mcpu=i686 -DVERSION=\"5.4\" -DXS_VERSION=\"5.4\" -fPIC
    | "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" Calc.c
    | gcc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
    | -fno-strict-aliasing
    | -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
    | -I/usr/include/gdbm -O2 -g -pipe
    | -march=i386 -mcpu=i686 -DVERSION=\"5.4\" -DXS_VERSION=\"5.4\" -fPIC
    | "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" DateCalc.c
    | Running Mkbootstrap for Date::Calc ()
    | chmod 644 Calc.bs
    | rm -f blib/arch/auto/Date/Calc/Calc.so
    | LD_RUN_PATH="" gcc -shared -L/usr/local/lib Calc.o DateCalc.o -o
    | blib/arch/auto/Date/Calc/Calc.so
    | chmod 755 blib/arch/auto/Date/Calc/Calc.so
    | cp Calc.bs blib/arch/auto/Date/Calc/Calc.bs
    | chmod 644 blib/arch/auto/Date/Calc/Calc.bs
    | Manifying blib/man3/Date::Calc::Object.3pm
    | Manifying blib/man3/Date::Calc.3pm
    | Manifying blib/man3/Date::Calendar.3pm
    | Manifying blib/man3/Date::Calendar::Profiles.3pm
    | Manifying blib/man3/Date::Calendar::Year.3pm
    |
    | All done!
    | ++++++++++++++++++++++++++++++
    |
    | The install script reads this from a config file:
    | PREFIX=/home/softouch/public_html/cgi-bin/PerlMods \
    | INSTALLPRIVLIB=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5 \
    | INSTALLSCRIPT=/home/softouch/public_html/cgi-bin/PerlMods/bin \
    | INSTALLSITELIB=/home/softouch/public_html/cgi-bin/PerlMod/perl5/site_perl \
    | INSTALLBIN=/home/softouch/public_html/cgi-bin/PerlMods/bin \
    | INSTALLMAN1DIR=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5/man \
    | INSTALLMAN3DIR=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5/man/man3
    |
    |
    | Is it possible to get this (and other modules) working without root /
    | telnet access? I would truly
    | appreciate some light here - I'm completely stumped and frustrated.

    I've managed to get the admins to install Date::Calc, which solves my larger problem, but of course
    still leaves the question about installing modules like it locally under my conditions.

    Perhaps it is a rule of thumb, that a module with .so or .xs files needs root access for
    installation? It would be nice to have some kind of guideline - this must be an FAQ but I couldn't
    find anything specifically addressing it. Thanks again for your input.
    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGRBiAACgkQ3RxspxLYVsWe2gCfWQOxnqQzkG QZD5ZhDSLe1p9S
    UtAAn1uvnkAYvRQf+HmOgImwsU9gdqoe
    =2vz5
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  8. #8

    Default Re: Local install of modules - no root; no telnet

    Amer Neely wrote:
    >
    > I've managed to get the admins to install Date::Calc, which solves my
    > larger problem, but of course
    > still leaves the question about installing modules like it locally under
    > my conditions.
    >
    > Perhaps it is a rule of thumb, that a module with .so or .xs files needs
    > root access for
    > installation? It would be nice to have some kind of guideline - this
    > must be an FAQ but I couldn't
    > find anything specifically addressing it. Thanks again for your input.
    It's more likely something your host has configured. Sounds like they've
    perhaps decided to allow you to build and install pure perl modules in
    your home directory, but not XS modules. Or perhaps their objective was
    something different - and this is just a ramification of that objective.

    I think the first thing to do is to ask *them* why you could not install
    Date::Calc yourself.

    Cheers,
    Rob

    --
    To reply by email u have to take out the u in kalinaubears.

    Sisyphus Guest

  9. #9

    Default Re: Local install of modules - no root; no telnet

    Amer Neely wrote:
    > Perhaps it is a rule of thumb, that a module with .so or .xs files needs
    > root access for installation?
    Not at all. XS modules *do* need a working C compiler - preferably the
    same one that Perl was built with - but they don't require root access.

    Tell me - what does your installer script do? Does it install your
    modules with "perl Makefile.PL PREFIX=/(etc)/PerlMods; make; make
    install"? Or, does it simply do "perl Makefile.PL; make" and then try to
    copy files to the correct locations on its own?

    I'm asking because you found Calc.pm in PerlMods/ - being an XS module,
    it would ordinarily be found in an architecture-specific subdirectory
    under PerlMods/.

    sherm--

    --
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Hire me! My resume: [url]http://www.dot-app.org[/url]
    Sherm Pendley Guest

  10. #10

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Sherm Pendley wrote:

    | Amer Neely wrote:
    |
    |> Perhaps it is a rule of thumb, that a module with .so or .xs files
    |> needs root access for installation?
    |
    |
    | Not at all. XS modules *do* need a working C compiler - preferably the
    | same one that Perl was built with - but they don't require root access.
    |
    | Tell me - what does your installer script do? Does it install your
    | modules with "perl Makefile.PL PREFIX=/(etc)/PerlMods; make; make
    | install"? Or, does it simply do "perl Makefile.PL; make" and then try to
    | copy files to the correct locations on its own?
    |
    | I'm asking because you found Calc.pm in PerlMods/ - being an XS module,
    | it would ordinarily be found in an architecture-specific subdirectory
    | under PerlMods/.
    |
    | sherm--
    |

    Here's my installer script. It uses a config to set varoius variables.
    ++++++++++++++++++++++++++++++++++++++
    #! /usr/bin/perl -w
    #
    # Install Perl modules
    #

    use Cwd;
    my $dir = cwd;
    my $ModDirectory = "PerlMods";
    my Modules = qw{Date-Calc-5.4.tar.gz};
    my SysCmd;

    # comment out this block when working
    BEGIN
    {
    open (STDERR,">>$0-err.txt");
    print STDERR "\n",scalar localtime,"\n";
    }

    print "Content-type: text/plain\n\n";

    # this block of code up to '=cut' is for wiping out the 'PerlMods' directory
    # and everything in it
    # therefore don't mess with this unless you _really_ know what you're doing

    =detour
    if (-e $ModDirectory)
    {
    SysCmd=("rm -R $ModDirectory");
    system(SysCmd);
    print "directory $ModDirectory deleted.\n";
    }

    # remove directories of modules if they already exist
    foreach my $d (Modules)
    {
    $d =~ s/.tar.gz//;
    if (-e $d)
    {
    SysCmd=("rm -R $d");
    system(SysCmd);
    print "directory $d deleted."
    }
    }
    print "All gone";
    exit;

    =cut
    ############## from here down is the install code #######

    print "This script is running in: $dir\n\n";

    foreach (Modules)
    {
    &Extract;
    }

    ##############################
    sub Extract
    {
    my SysCmd;
    my $ModDirectory = "PerlMods";
    # make 'PerlMods' directory to hold module directories
    if (!-e $ModDirectory)
    {
    print "Making directory '$ModDirectory' to hold the modules ... \n";
    SysCmd = ("mkdir $ModDirectory");
    system(SysCmd);
    }

    if (-e $ModDirectory)
    {
    # copy *.tar.gz files to 'PerlMods' directory
    print "Copying *.gz to $ModDirectory ..\n";
    SysCmd=("cp *.gz $ModDirectory" or die "can not copy *.gz to $ModDirectory:$!\n" );
    system (SysCmd);

    #SysCmd=("cp *.tar $ModDirectory");
    #system (SysCmd);

    # change to 'PerlMods' directory
    use Cwd 'chdir';
    chdir $ModDirectory;


    print "We are in the $dir directory\n";

    print "Now installing each module under $ModDirectory ...\n";
    foreach my $Module(Modules)
    {
    print "Now making $ModDir directory under $ModDirectory ...\n";

    # now unzip and untar
    print "Module is: $Module\n";
    SysCmd = ("gzip -d $Module");
    system(SysCmd);
    $Module =~ s/.gz//;
    print "Module is now: $Module\n";
    if (-e $Module)
    {
    print "$Module found\n";
    print "Now running 'tar' ...\n";
    SysCmd = ("tar -xf $Module");
    system(SysCmd);

    $Module =~ s/.tar//;
    chdir $Module;
    $dir=getcwd();

    #SysCmd = ("export PERL5LIB = /home/softouch/public_html/cgi-bin/PerlMods");

    print "We are now in $dir\n";
    #SysCmd = ("perl Makefile.PL PREFIX=/home/softouch/public_html/cgi-bin/PerlMods");
    SysCmd= ("perl Makefile.PL `cat install_pm.cfg`");
    system(SysCmd);

    SysCmd=("make");
    system(SysCmd);

    SysCmc=("make test");
    system(SysCmd);

    SysCmd=("make install");
    system(SysCmd);
    }
    else
    {
    print " $Module NOT untarred\n";
    }
    }
    print "\nAll done!\n";
    }
    }
    +++++++++++++++++++++++++++++++++
    The config file:
    PREFIX=/home/softouch/public_html/cgi-bin/PerlMods \
    INSTALLPRIVLIB=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5 \
    INSTALLSCRIPT=/home/softouch/public_html/cgi-bin/PerlMods/bin \
    INSTALLSITELIB=/home/softouch/public_html/cgi-bin/PerlMod/perl5/site_perl \
    INSTALLBIN=/home/softouch/public_html/cgi-bin/PerlMods/bin \
    INSTALLMAN1DIR=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5/man \
    INSTALLMAN3DIR=/home/softouch/public_html/cgi-bin/PerlMods/lib/perl5/man/man3
    +++++++++++++++++++++++++++++++++

    Bear in mind I'm not at all sure what all that means, I'm just using an example I found, but tweaked
    for my paths, in an attempt to get this thing installed.
    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGRhlYACgkQ3RxspxLYVsVl9wCff9V0Vt7ksg 2Fbx5wFzdag3w3
    1fYAn2hC9HzASuQ2K9KVQV8Jubm08aN5
    =64VO
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  11. #11

    Default Re: Local install of modules - no root; no telnet

    Amer Neely wrote:
    > Here's my installer script. It uses a config to set varoius variables.
    I won't say much about the lack of "use strict", nor on the use of &
    when calling subs. You *should* fix those things, better sooner than
    later, but they're not really the cause of the problem.
    > print "We are now in $dir\n";
    > #SysCmd = ("perl Makefile.PL
    > PREFIX=/home/softouch/public_html/cgi-bin/PerlMods");
    > SysCmd= ("perl Makefile.PL `cat install_pm.cfg`");
    > system(SysCmd);
    >
    > SysCmd=("make");
    > system(SysCmd);
    >
    > SysCmc=("make test");
    > system(SysCmd);
    >
    > SysCmd=("make install");
    > system(SysCmd);
    Okay, that's actually better than I'd assumed. You're doing the right
    thing here, there's just a problem with the variables in the config
    file. In all likelihood, you want to use just PREFIX alone, without
    specifying all of the fine-grained variables you're using in your config
    file. That should arrange things properly under PerlMods/, without your
    having to move them around.

    Having said that - arranging things properly means that you'll need to
    add *two* different directories to INC. PerlMods/ - which looks to be
    there already - is where "pure Perl" modules will go. XS modules will go
    into PerlMods/5.8.0/i386-linux-thread-multi/, meaning you'll need to add
    that to INC as well.

    Note that the default INC has both "pure Perl" and XS directories
    listed under /usr/lib/perl5 as well - use those as your guide to what
    will appear under PerlMods/.

    If you *do* want fine-grained control over installation location, have a
    look at "perldoc ExtUtils::MakeMaker". It has a complete list of
    variables you want to use in your config file, and details about how
    they affect one another.

    sherm--

    --
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Hire me! My resume: [url]http://www.dot-app.org[/url]
    Sherm Pendley Guest

  12. #12

    Default Re: Local install of modules - no root; no telnet

    I've never needed to resort to such lengths to do a local install.
    I just use CPAN.pm. As a user, run

    perl -MCPAN -e shell

    and answer the questions, being sure to give an installation
    prefix that you can write to in the location you want to use
    for "use lib" statements.

    Sometimes that doesn't work because perl thinks you're
    trying to run root's CPAN configuration. Then just copy
    root's configuration to where your own goes:

    mkdir ~/.cpan
    mkdir ~/.cpan/CPAN
    cp .../Config.pm ~/.cpan/CPAN/MyConfig.pm

    where ... is the location of CPAN::Config.pm on your system
    as given by "perldoc -mv CPAN::Config". Then edit that file to
    change the paths.

    Then you can install modules just with, e.g.,

    perl -MCPAN -e 'install Date::Calc'

    --
    Peter Scott
    [url]http://www.perldebugged.com/[/url]
    *** NEW *** [url]http://www.perlmedic.com/[/url]
    Peter Scott Guest

  13. #13

    Default Re: Local install of modules - no root; no telnet

    Peter Scott wrote:
    > I've never needed to resort to such lengths to do a local install.
    > I just use CPAN.pm. As a user, run
    >
    > perl -MCPAN -e shell
    Read the subject. That's hard to do without shell access.

    sherm--

    --
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Hire me! My resume: [url]http://www.dot-app.org[/url]
    Sherm Pendley Guest

  14. #14

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Peter Scott wrote:

    | I've never needed to resort to such lengths to do a local install.
    | I just use CPAN.pm. As a user, run
    |
    | perl -MCPAN -e shell
    |

    That sounds fantastic, except for one thing, unless I'm missing it. I do not have telnet access, so
    how do I get to the shell?

    Believe me, I even tried putting that into a Perl script, which of course did nothing.
    ]
    | and answer the questions, being sure to give an installation
    | prefix that you can write to in the location you want to use
    | for "use lib" statements.
    |
    | Sometimes that doesn't work because perl thinks you're
    | trying to run root's CPAN configuration. Then just copy
    | root's configuration to where your own goes:
    |
    | mkdir ~/.cpan
    | mkdir ~/.cpan/CPAN
    | cp .../Config.pm ~/.cpan/CPAN/MyConfig.pm
    |
    | where ... is the location of CPAN::Config.pm on your system
    | as given by "perldoc -mv CPAN::Config". Then edit that file to
    | change the paths.
    |
    | Then you can install modules just with, e.g.,
    |
    | perl -MCPAN -e 'install Date::Calc'
    |

    So if I were to make those directories, then put the above line in a script, you think that should work?

    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGSpMEACgkQ3RxspxLYVsXbBgCgqnmAqQYEN+ PXqtr6b5Sw7pev
    GpMAniGdrh55l+8cYkei7WHLdOXZMp8a
    =9uxr
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  15. #15

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Sherm Pendley wrote:

    | Amer Neely wrote:
    |
    |> Here's my installer script. It uses a config to set varoius variables.
    |
    |
    | I won't say much about the lack of "use strict", nor on the use of &
    | when calling subs. You *should* fix those things, better sooner than
    | later, but they're not really the cause of the problem.

    :) I usually do use strict - don't know why I didn't in this one. But what subs are you referring
    to? I always use '&' if there's a sub I call. Is 'system' a sub somewhere?

    |
    |> print "We are now in $dir\n";
    |> #SysCmd = ("perl Makefile.PL
    |> PREFIX=/home/softouch/public_html/cgi-bin/PerlMods");
    |> SysCmd= ("perl Makefile.PL `cat install_pm.cfg`");
    |> system(SysCmd);
    |>
    |> SysCmd=("make");
    |> system(SysCmd);
    |>
    |> SysCmc=("make test");
    |> system(SysCmd);
    |>
    |> SysCmd=("make install");
    |> system(SysCmd);
    |
    |
    | Okay, that's actually better than I'd assumed. You're doing the right
    | thing here, there's just a problem with the variables in the config
    | file. In all likelihood, you want to use just PREFIX alone, without
    | specifying all of the fine-grained variables you're using in your config
    | file. That should arrange things properly under PerlMods/, without your
    | having to move them around.
    |
    | Having said that - arranging things properly means that you'll need to
    | add *two* different directories to INC. PerlMods/ - which looks to be
    | there already - is where "pure Perl" modules will go. XS modules will go
    | into PerlMods/5.8.0/i386-linux-thread-multi/, meaning you'll need to add
    | that to INC as well.
    |
    | Note that the default INC has both "pure Perl" and XS directories
    | listed under /usr/lib/perl5 as well - use those as your guide to what
    | will appear under PerlMods/.
    |
    | If you *do* want fine-grained control over installation location, have a
    | look at "perldoc ExtUtils::MakeMaker". It has a complete list of
    | variables you want to use in your config file, and details about how
    | they affect one another.
    |
    | sherm--
    |

    This is starting to make sense now - very good explanation. Thank you. I had seen references to
    'pure Perl' but wasn't quite sure what it was.

    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGSpngACgkQ3RxspxLYVsW1hwCePYIWNZoFp6 7gf1mgzTAj38u6
    6rsAn0BU29YDgQGZdY1Y7q6rABpM+/Qp
    =69Aj
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  16. #16

    Default Re: Local install of modules - no root; no telnet

    Amer Neely wrote:
    > what subs are you referring to? I always use '&' if there's a sub I call.
    I didn't intend to make an issue of it - but since you asked. ;-)

    Those are the ones I'm referring to. When you call the Extract sub, for
    instance, you probably want to do it with "Extract()" instead of "&Extract".

    The "&" syntax was required in Perl 4, and is deprecated in Perl 5, but
    supported for compatibility with old scripts. It has some subtle side
    effects that you may not want - it cirvents argument checking via
    prototypes, and makes the current _ visible to the called sub instead
    of giving it its own argument list.

    Have a look at "perldoc perlsub" for details.
    > had seen references to
    > 'pure Perl' but wasn't quite sure what it was.
    They're kept in separate directories because the compiled component of
    XS modules can only be used with the Perl version and/or architecture it
    was built for. It's obvious you can't load a Linux/x86 binary under
    Solaris for Sparc, for instance.

    It's somewhat less obvious that you can't load an XS module that's built
    for Perl 5.6.x under 5.8.x, or one that's built for a multi-threaded
    Perl under a single-threaded Perl. That's true even if both modules are
    built for the same CPU & OS.

    So XS modules are kept in a separate location from "pure Perl" modules,
    with the idea that the directory with the portable "pure Perl" modules
    can be shared among any number of machines in a network, or Perls on a
    machine.

    sherm--

    --
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Hire me! My resume: [url]http://www.dot-app.org[/url]
    Sherm Pendley Guest

  17. #17

    Default Re: Local install of modules - no root; no telnet

    In article <TPydnX1KcttB3A_cRVn-rAadelphia.com>,
    Sherm Pendley <spamtrapdot-app.org> writes:
    >Peter Scott wrote:
    >
    >> I've never needed to resort to such lengths to do a local install.
    >> I just use CPAN.pm. As a user, run
    >>
    >> perl -MCPAN -e shell
    >
    >Read the subject. That's hard to do without shell access.
    Missed that. Okay, what I would be trying to do would be
    to get the CPAN MyConfig.pm in place, then run a CGI
    program that contained 'perl -MCPAN -e "install Date::Calc"'.
    Module installation can be just too hairy without CPAN.pm.
    (Unless you have shell access to a machine that's *identical*
    in configuration so you can do a CPAN install there and
    make a tarball of the new files.) Just make sure the
    prerequisite policy is set to 'follow' instead of 'ask',
    and of course you may still be out of luck on modules
    that interact with the user on builds.

    A CGI program that prompts you to enter any command and
    then shows you the result of executing it is extremely
    helpful. Malcolm Dew-Jones once advertised one that
    sounded like a deluxe version; Google should find it.
    I haven't used it myself though.

    --
    Peter Scott
    [url]http://www.perldebugged.com/[/url]
    *** NEW *** [url]http://www.perlmedic.com/[/url]
    Peter Scott Guest

  18. #18

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Peter Scott wrote:

    | In article <TPydnX1KcttB3A_cRVn-rAadelphia.com>,
    | Sherm Pendley <spamtrapdot-app.org> writes:
    |
    |>Peter Scott wrote:
    |>
    |>
    |>>I've never needed to resort to such lengths to do a local install.
    |>>I just use CPAN.pm. As a user, run
    |>>
    |>> perl -MCPAN -e shell
    |>
    |>Read the subject. That's hard to do without shell access.
    |
    |
    | Missed that. Okay, what I would be trying to do would be
    | to get the CPAN MyConfig.pm in place, then run a CGI
    | program that contained 'perl -MCPAN -e "install Date::Calc"'.
    | Module installation can be just too hairy without CPAN.pm.
    | (Unless you have shell access to a machine that's *identical*
    | in configuration so you can do a CPAN install there and
    | make a tarball of the new files.) Just make sure the
    | prerequisite policy is set to 'follow' instead of 'ask',
    | and of course you may still be out of luck on modules
    | that interact with the user on builds.
    |
    | A CGI program that prompts you to enter any command and
    | then shows you the result of executing it is extremely
    | helpful. Malcolm Dew-Jones once advertised one that
    | sounded like a deluxe version; Google should find it.
    | I haven't used it myself though.
    |
    This sounds pretty useful. I tend to end up trying to wedge something into someone else's existing
    code, and inevitably it requires another module. Not all admins will install one for you, so I've
    been fumbling around trying to find ways to do it. I thought I had it with my install script, but
    now realize I was only lucky :) - hadn't hit any modules with the .xs or .so files yet. I'll check
    out this one. Thanks for the input.

    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGTmG0ACgkQ3RxspxLYVsVpcACePWjM6wqP2i TycSuWXc2ngtfQ
    MZAAnA6E7WfBBfCAovmzbo4I9CbG4hjJ
    =L1k3
    -----END PGP SIGNATURE-----
    Amer Neely Guest

  19. #19

    Default Re: Local install of modules - no root; no telnet

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Sherm Pendley wrote:

    | Amer Neely wrote:
    |
    |> what subs are you referring to? I always use '&' if there's a sub I call.
    |
    |
    | I didn't intend to make an issue of it - but since you asked. ;-)
    |
    | Those are the ones I'm referring to. When you call the Extract sub, for
    | instance, you probably want to do it with "Extract()" instead of
    | "&Extract".
    |
    | The "&" syntax was required in Perl 4, and is deprecated in Perl 5, but
    | supported for compatibility with old scripts. It has some subtle side
    | effects that you may not want - it cirvents argument checking via
    | prototypes, and makes the current _ visible to the called sub instead
    | of giving it its own argument list.
    |
    | Have a look at "perldoc perlsub" for details.
    |
    |> had seen references to
    |> 'pure Perl' but wasn't quite sure what it was.
    |
    |
    | They're kept in separate directories because the compiled component of
    | XS modules can only be used with the Perl version and/or architecture it
    | was built for. It's obvious you can't load a Linux/x86 binary under
    | Solaris for Sparc, for instance.
    |
    | It's somewhat less obvious that you can't load an XS module that's built
    | for Perl 5.6.x under 5.8.x, or one that's built for a multi-threaded
    | Perl under a single-threaded Perl. That's true even if both modules are
    | built for the same CPU & OS.
    |
    | So XS modules are kept in a separate location from "pure Perl" modules,
    | with the idea that the directory with the portable "pure Perl" modules
    | can be shared among any number of machines in a network, or Perls on a
    | machine.
    |
    | sherm--
    |
    My head is starting to hurt, I guess that's a sign of growth :) Thanks for sharing, and I'll try to
    get with the program re sub calling.

    - --
    /* All outgoing email scanned by AVG Antivirus */
    Amer Neely, Softouch Information Services
    Home of Spam Catcher & North Bay Information Technology Networking Group
    W: [url]www.softouch.on.ca[/url]
    E: [email]trudgesoftouch.on.ca[/email]
    Perl | PHP | MySQL | CGI programming for all data entry forms.
    "We make web sites work!"
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (MingW32)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAkGTmMYACgkQ3RxspxLYVsUr/gCfXN1jseAbtFp3UOAk2bPm/jeM
    pFoAmgNRHQhhWsE7KLT0kT7S3jCRRHDM
    =ZeQs
    -----END PGP SIGNATURE-----
    Amer Neely Guest

Similar Threads

  1. changing local root folder
    By Jim in Merced CA in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: January 4th, 12:05 AM
  2. compiling/add modules when no root access
    By gbarn in forum PERL Modules
    Replies: 2
    Last Post: March 23rd, 06:37 AM
  3. Installing modules locally as a non root
    By sravi in forum PERL Modules
    Replies: 6
    Last Post: May 23rd, 12:27 PM
  4. how to include modules in local dir
    By Palaniappan in forum PERL Modules
    Replies: 4
    Last Post: October 30th, 01:01 PM
  5. Telnet Access as root
    By David Z Maze in forum Debian
    Replies: 3
    Last Post: August 5th, 11:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139