Installing perl modules on Ubuntu

In summary, Jonathan is trying to install the mod_perl-2.0.4 module, but is having trouble following the directions. He runs into trouble when trying to run the "perl Makefile.PL" command, and is asked for the location of the 'apxs' script. He finds a Perl script located in a folder in his perl5 directory called 'win32_fetch_apxs', but when he enters the file path to this script, he gets the following error message: "error: Unable to determine server version, aboring". He is not sure what to do at this point.
  • #1
Chromium
56
0
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?

thanks,

--Jonathan
 
Technology news on Phys.org
  • #2
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)?
 
  • #3
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.
 
  • #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?
 
  • #5
Sorry, didn't see your second post. I'm only using Ubuntu. No Windows here :)
 
  • #6
Chromium said:
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?

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.
 
  • #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.
 
  • #8
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.
 
  • #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?
 
  • #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??
 

Related to Installing perl modules on Ubuntu

1. How do I install Perl modules on Ubuntu?

To install Perl modules on Ubuntu, you can use the apt-get command in the terminal. First, make sure you have the latest package information by running sudo apt-get update. Then, use the apt-get command with the install option followed by the name of the Perl module you want to install. For example, sudo apt-get install libmodule-name-perl. This will download and install the module and any necessary dependencies.

2. How do I search for available Perl modules on Ubuntu?

To search for available Perl modules on Ubuntu, you can use the apt-cache command. This will display a list of all packages that match your search term. For example, to search for modules related to XML, you can use apt-cache search perl xml. This will return a list of packages with "perl" and "xml" in their names or descriptions.

3. Can I install Perl modules from CPAN on Ubuntu?

Yes, you can install Perl modules from CPAN on Ubuntu. However, it is recommended to first check if the module is available in the Ubuntu repositories using the apt-cache command. If the module is not available, you can use the cpan command in the terminal. This will open the CPAN shell, where you can search for and install the desired module.

4. How do I check if a Perl module is already installed on Ubuntu?

To check if a Perl module is already installed on Ubuntu, you can use the dpkg command. Simply run dpkg -l | grep module-name in the terminal, replacing "module-name" with the name of the module you want to check. If the module is installed, its version and other information will be displayed. If nothing is returned, the module is not installed.

5. How do I update Perl modules on Ubuntu?

To update Perl modules on Ubuntu, you can use the apt-get command. First, make sure you have the latest package information by running sudo apt-get update. Then, use the apt-get command with the install option followed by the name of the module you want to update. For example, sudo apt-get install --only-upgrade libmodule-name-perl. This will check for any updates to the module and install them if available.

Similar threads

  • Programming and Computer Science
Replies
1
Views
361
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
9
Views
896
  • Computing and Technology
Replies
5
Views
499
  • Programming and Computer Science
Replies
1
Views
409
  • Programming and Computer Science
Replies
1
Views
1K
Replies
3
Views
2K
  • Programming and Computer Science
Replies
0
Views
602
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
4
Views
3K
Back
Top