Installation of 2.1 on Mac OS X 10.4.2
This is a summary of my experience installing webwork on a (new) mac running OS 10.4.2. When I refer to the "instructions," I'm referring to the general instructions for installing WeBWorK 2.1 which are here.
- MySQL from MySQL. There are instructions here http://dev.mysql.com/doc/mysql/en/mac-os-x-installation.html. There was an issue. Since I was running Tiger on a spanking new dual processor G5, I thought I should run the 64 bit version of MySQL. But I had errors compiling the perl module DVD::mysql which I was unable to resolve. (Here is the error:
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/mysql/lib -lmysqlclient -lz -lm /usr/bin/ld: truncated or malformed archive: /usr/local/mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it)collect2: ld returned 1 exit status make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 1
- I eventually installed the 32 bit version of MySQL instead, and was able at that point to compile DBD::mysql.
- Also, you will probably need to change the ownership of /usr/local/mysql/data (and all of its contents) to mysql. A command like
chown -R mysql /usr/local/mysql/datais what I used.
- XCode Tools. This should be possible from the Tiger DVD. Probably also possible by downloading from Apple.
- Fink (probably not necessary, but I used fink's tetex, and netpbm and a few other things). From http://fink.sf.net, and I just did a binary install.
- X11 (from the Tiger DVD), so that fink's tetex installs.
sudo apt-get install tetex</ncode>
- netpbm (also with apt-get after installing fink)
- tth from source at http://hutchinson.belmont.ma.us/tth.
perl -MCPAN -e shellto set up CPAN perl module installation. Then started installing perl modules using module list from the WebWork Installation Manual
In particular, used the command:
sudo perl -MCPAN -e "install Module"
to install maodules off the list at [] which went like this in roughly this order:
Apache::Request OK DateTime Had to install DateTime::TimeZone first. Date::Format OK Date::Parse OK GD Needed to have libgd. So first did "sudo apt-get install gd2". Then libgd was in /sw/lib. Mail::Sender OK Time::HiRes OK XML::Parser Needed expat. So first did "sudo apt-get install expat." Then needed to change MakeFile.PL to give EXPATLIBPATH and EXPATINCLUDEPATH (as instructed when running perl -MCPAN). MakeFile.PL is in the appropriate subdirectory of ~/.cpan/build. After editing MakeFile.PL, do "sudo make && make test && make install". XML::Parser::EasyTree OK XML::Writer OK DBI OK DBD::mysql MySQL has to be installed to compile, and running to test.
Two perl modules required more complicated work. First SOAP::Lite compiled, but failed tests. I ended up force installing it.
Next Data::UUID wouldn't compile. The relevant error message was
cc -c -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\"0.11\" -DXS_VERSION=\"0.11\" "-I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE" -D_STDIR=\"/var/tmp\" -D__darwin__ -D_DEFAULT_UMASK=0007 UUID.c In file included from UUID.xs:4: UUID.h:93: error: conflicting types for 'uuid_t' /usr/include/unistd.h:121: error: previous declaration of 'uuid_t' was here make: *** [UUID.o] Error 1 /usr/bin/make -- NOT OK
Davide Cervone figured out how to edit the source in order to get this module to compile on Tiger. Here is what he suggested, which has worked for me too:
After unpacking the tar file (for the perl module), and running perl Makefile.pl, run make as usual. This will produce the error you saw before, but will also create the UUID.c file, which you will need to edit.
Make the following changes:
In UUID.c, move the line #include "UUID.h" (line 13) to above the line #line 1 "UUID.xs" (line 9)
In UUID.h, remove (or comment out) the line #include <unistd.h> (line 7).
In Makefile, add -D_UUID_T after -DPERL_DARWIN on the CCFLAGS line (line 273).
Then run make again; it should now succeed (at least it did for me). It also passed make test. And then run "sudo make install."
Installing WeBWorK proper.
Download webwork2 and pg2 tarballs. Installed in usr/local with links as "pg" and "webwork2" (ln -s webwork-2.1.3 webwork2).
Chang permissions in various ways according to the instructions. On Tiger, httpd runs as user: www, group: www, so you want to make sure that if you leave that alone, then when you do the "chgrp" command as in the instructions, you do it for the group "www."
Edited global.conf according to instructions, and other configuration files, including /etc/httpd/httpd.conf and webwork-apache.conf. After making a copy of the original /etc/httpd/httpd.conf, you need to uncomment the following lines;
LoadModule info_module libexec/httpd/mod_info.so LoadModule perl_module libexec/httpd/libperl.so AddModule mod_info.c AddModule mod_perl.c
Then you need to add this code (which I put at the end of the file):
<Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from .uoregon.edu </Location> Include /usr/local/webwork2/conf/webwork.apache-config
Apache wouldn't restart because of SOAP::Lite. So force installed SOAP::Lite.
Now Apache starts with "webwork is really ready!"
If you are having problems here, you may want to be restarting apache from the commandline so you can read error messages. The relevant command are
to restart, and
to test the configuration files and tell you what is wrong with them.
We've finished the first week of classes. Four of us are using this. The only WeBWorK related problem we've had so far centers around students being able to log into WeBWorK with a different upper-case/lower-case mix than their actual username, and then being unable to do things like print copies of their homework.
-- Main.HalSadofsky - 02 Oct 2005