Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Installing perl modules on Ubuntu

  1. Jan 26, 2010 #1
    hi everyone,

    I'm trying to install the following Perl module: mod_perl-2.0.4

    And I've been trying to following these directions (specifically, the "if you're on UNIX" section): http://www.cpan.org/modules/INSTALL.html

    Now, I extracted the files and placed the new directory into my perl5 directory, but when I try to run the "perl Makefile.PL" command I begin to run into trouble. I'm asked for the location of the 'apxs' script. I found a Perl script located in a folder in my perl5 directory called 'win32_fetch_apxs', but when I enter the file path to this script, I get the following error message:

    error: Unable to determine server version, aboring
    error: Invalid MP_APXS specified?

    I'm not really sure what to do at this point. Could someone with experience installing Perl modules please help me out?


  2. jcsd
  3. Jan 26, 2010 #2


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    The win32_fetch_apxs file is probably the Windows version of what you need. See if you can find a Unix version. Also, are you running as root (as specified in the instructions)?
  4. Jan 26, 2010 #3


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    Another thing to watch for is where you unzip files. Some programs really get messed up if you unzip them in Windows and then upload them to Unix. Make sure that you are unzipping them on the Unix machine.
  5. Jan 26, 2010 #4
    No I haven't been running as the root user. I didn't see anything in the instructions telling me to do so. I guess I missed it. But since Ubuntu doesn't have a root password by default, would I have to say something like "sudo perl Makefile.PL"?

    I did a search of the file system for 'apxs' and the only files that came up which had 'apxs' in their names were ones with 'win32' as well. Is there a special phrase to denote UNIX versions of files?
  6. Jan 26, 2010 #5
    Sorry, didn't see your second post. I'm only using Ubuntu. No Windows here :)
  7. Jan 26, 2010 #6


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    A win32 usually denotes a Windows version of a file. I'm not sure what Ubuntu is so I can't help much with that. Unix versions of the files will often end in .sh or something like that - it depends on the shell that you're using. I don't work on Unix a lot so I'm not the expert there.

    In any case, the main issue sounds like path and permission problems. What I would do is to look at the Makefile.PL file and see what it's trying to do. Make sure that the paths and variables that it's trying to access are set up correctly (use the set command to see how you're set up). It may point to other files which you may have to examine as well. Don't get discouraged if you start getting different errors. It usually means that it's happy with the last fix and wants you to fix the next one. I have to log off for the day but, I'll check back tomorrow.
  8. Jan 27, 2010 #7
    I took a look at Makefile.PL, and to be honest, I have no idea what it's trying to do. I'm barely able to write simple file I/O code in Perl, much less understand this thing. I'll keep trying though...

    Thanks for your help so far, Borg.
  9. Jan 28, 2010 #8


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    If you would like to post it, myself and others could explain what you're looking at. If it's too long, the first 50 lines or so are probably setting up the variables.
  10. Jan 28, 2010 #9
    Well, I think I've made some progress, so I'm not sure if taking a look at Makefile.PL is necessary. Here's what I've done:

    It turns out there are two perl5 directories on my machine. I'm having a hard time copying the mod_perl-2.0.4 directory to both, so I'm just using it one perl5 directory. I navigated to the mod_perl-2.0.4 directory in terminal, and typed the following:

    perl Makefile.PL

    I then get a message about Perl being configured to link against libgdbm (whatever that means). Then I'm prompted for the file path to the apxs script, or to press enter if I don't have it installed. Since I can't find anything that doesn't have both "win32" and "apxs" in the name, I just press enter.

    Then I'm asked for the Apache directory, so I give it the file path to an Apache directory within the perl5 directory. I then get an error message saying it can't find the following file: ap_release.h.

    I'm not familiar with Apache, but judging from this message & what I've read on Google, this is a header file that Apache uses. So this brings me to two questions:

    1) What the hell does Apache use headers for? I've only used them when working with C++.

    2) Is ap_release.h something I can download using synaptic package manager?
  11. Jan 28, 2010 #10
    ok, so I don't think I had Apache2 or mod_perl installed before. I installed both with synaptic package manager, but there's still no ap_release.h.

    wtf.....does anyone know where the hell I can find ap_release.h??
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Installing perl modules Date
Python How to Install the Basemap and the GEOS Library? May 28, 2017
C/++/# How to install x11 headers on android? Sep 26, 2016
Problem with Rational Rose Installation Jun 5, 2016
Python Problems installing Python modules Apr 12, 2016
I love perl May 17, 2015