Installing perl modules on Ubuntu

  • Thread starter Thread starter Chromium
  • Start date Start date
  • Tags Tags
    Modules Ubuntu
AI Thread Summary
The discussion revolves around the challenges of installing the Perl module mod_perl-2.0.4 on Ubuntu. The user encounters issues with the 'apxs' script and permissions, realizing they need to run commands as root using "sudo." They also struggle to locate the necessary 'ap_release.h' header file after installing Apache2 and mod_perl via the package manager. The conversation highlights the importance of ensuring the correct file paths and permissions when installing Perl modules on Unix systems. The user seeks further assistance in locating the missing header file essential for the installation process.
Chromium
Messages
56
Reaction score
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
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)?
 
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.
 
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?
 
Sorry, didn't see your second post. I'm only using Ubuntu. No Windows here :)
 
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.
 
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.
 
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.
 
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??
 

Similar threads

Replies
1
Views
3K
Replies
2
Views
2K
Replies
9
Views
1K
Replies
5
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
2
Views
3K
Replies
0
Views
2K
Back
Top