Order of Installation and Apache::Request problem

Order of Installation and Apache::Request problem

by Thomas Hagedorn -
Number of replies: 4
I'm trying to install Webwork on a brand new MacBook Pro with 10.5.2. I was following the list of packages in the installation guide for 10.4 and hit an error (see below) for Apache:Request. So I have a few questions:

1. What is the order of installation of the packages? I installed Apache 2.0.63 (mpm-prefork), Perl (already installed by XCode I believe) and then started with the Perl modules.

2. I noted that some people install mod_perl before the Perl modules. Is that needed?

3. When installing Apache2::Request, I get the error

"You are running the test suite under user 'root'.
Apache cannot spawn child processes as 'root', therefore
we attempt to run the test suite with user 'nobody' (4294967294:4294967294).
The problem is that the path (including all parent directories):
must be 'rwx' by user 'nobody', so Apache can read and write under that

There are several ways to resolve this issue. One is to move and
rebuild the distribution to '/tmp/' and repeat the 'make test'
phase. The other is not to run 'make test' as root (i.e. building
under your /home/user directory)."

There are a number of posts about this error over at the Apache forums, but I can't understand exactly what the solution would be (I'm learning cpan as I go here). How does one know when one needs to be root when to install the packages? Can I execute

sudo perl -MCPAN -e "install Apache2::Request"

to install the package and then run

perl -MCPAN -e "install Apache2::Request"

to get the test suite to run (as non-root). But this last part has problems (See 4).

4. If I just run the command

perl -MCPAN -e "install Apache2::Request"

eventually, I get the following error:

waiting 60 seconds for server to start: .httpd: Syntax error on line 248 of /Users/hagedorn/.cpan/build/libapreq2-2.08-8Rem9k/module/t/conf/httpd.conf: Cannot load /Users/hagedorn/.cpan/build/libapreq2-2.08-8Rem9k/module/apache2/.libs/ into server: dlopen(/Users/hagedorn/.cpan/build/libapreq2-2.08-8Rem9k/module/apache2/.libs/, 10): no suitable image found. Did find:\n\t/Users/hagedorn/.cpan/build/libapreq2-2.08-8Rem9k/module/apache2/.libs/ mach-o, but wrong architecture
waiting 60 seconds for server to start: not ok
[ error] giving up after 61 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP_TIMEOUT
to a high value (e.g. 360) and repeat the last command.

[ error] server failed to start! (t/logs/error_log wasn't created, start the server in the debug mode)
make[1]: *** [run_tests] Error 1
make: *** [module_test] Error 2
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports JOESUF/libapreq2-2.08.tar.gz
Alert: While trying to 'dump' YAML file
with 'YAML' the following error was encountered:
YAML Error: Couldn't open /Users/hagedorn/.cpan/build/libapreq2-2.08-8Rem9k.yml for output:\n
at /System/Library/Perl/5.8.8/ line 479


Why would I get a wrong architecture error? And is the server failing to start because I am not running as root?

Thanks in advance,
In reply to Thomas Hagedorn

Re: Order of Installation and Apache::Request problem

by Thomas Hagedorn -
I've subsequently figured out that I don't have a working version of mySQL. Apparently, there are problems with installing in on OS 10.5. So that might be contributing to the problems above.

In reply to Thomas Hagedorn

MySql installation problem on OS 10.52

by Thomas Hagedorn -

I just downloaded the Mac OSX Moodle package and its versions of Apache and MySQL are up and running. It's running MySQL 5.0.41. The same package was meant for both 10.4 and 10.5 systems, so perhaps I should try to install an earlier MySQL version for 10.4 and see if that works.


In reply to Thomas Hagedorn

Re: Order of Installation and Apache::Request problem

by Arnold Pizer -
Hi Tom,

I don't have any experience with OS X but the usual procedure when compiling modules is to first do all the initial steps as a regular user and then at the end switch to root (or use sudo) and run "make install" as root. You can look at for examples. Search for "make install" in that document. You will find examples of installing perl modules from source and also installing apache2, mod_perl, and libapreq2 (which includes Apache2::request) from source.

You have probably already figured this out. If so it would be useful to others to post your method.

In reply to Thomas Hagedorn

Re: Order of Installation and Apache::Request problem

by Thomas Hagedorn -

Thanks for the helpful advice. To close out this thread, here's what I've learned over the past few days.

1. Currently there is a problem trying to install mySQL and some of the Perl modules on a 64-bit Mac running 10.5.x. In particular, installing via CPAN is unlikely to work as one needs to use configuration flags such as

-CFLAGS="-arch x86_64 "

as part of the "./configure" or "Makefile.PL" command.

Also, the current 64-bit version of mySQL for (Mac) Leopard 10.5.2 has a bug working with the Preference panel included in the binary package. I had to make a clean reinstall.

2. For packages such as Apache2::Request and DBD::mysql, for which a CPAN installation gives errors, one needs to do a manual install. For me, it was easiest to download the .tar.gz file, and then run

./configure or Makefile.PL
make test or make check (optional)
sudo make install

For some packages, one needs to run sudo make or sudo make test as they require permissions. But for other packages, (such as Apache::Request) you don't want to run "make test" as the superuser.

3. In the end, the order of installation was mysql, Apache2, mod_perl2, Apache::Request, DBD::mysql, but I'm not sure the order of the last three mattered. It's just they increased in difficulty in the number of flags they used, so starting with the easier installations is probably best (since I learned what I was doing as I went).

4. I would recommend not using Fink currently for installations on a 64-bit Leopard platform. In the end, I had to delete most of the programs and libraries I installed using Fink as they seemed to be 32-bit based. The manual installations (once I knew what I was doing) worked much better.