Tuesday, March 4, 2008

Getting gbscmd to run under Mac OS X Tiger

I finally got around to trying to run gbscmd on my Macbook and found that I needed to do a little configuration to get it going.

There may be other ways to do this, but these are the steps I took:

1. Install Fink from http://www.finkproject.org/download/bindist.php?phpLang=en

This will install 'apt-get', which you'll need to download some libraries.

2. Once that's successfull, run the following commands:

sudo apt-get install libxml
sudo apt-get install libxml2
sudo apt-get install libxslt
sudo apt-get install expat

This will install the above libraries.

3. Install XCode (the Mac development package). Happily (since I'm away from my install DVD), you can download this from Apple after a (FREE) registration: http://developer.apple.com/tools/xcode/

That will install gcc and make, which are required for the following building of Perl modules.

2. run 'sudo cpan' to access CPAN and start building some of the prerequisite packages.

3. At the cpan prompt, run o conf make /usr/bin/make.

4. At the cpan prompt, run install XML::LibXML. At every prompt, just hit Enter to accept the default.

5. At the cpan prompt, run the following commands:

o conf makepl_arg "EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include"
install XML::Parser


6. Now, still at the cpan prompt, run the following commands:

o conf makepl_arg ""
install LWP


7. Now you can exit cpan with "q".

8. If all is well, you can now run gbscmd without any Perl errors. However, if you do have errors about missing packages, you can go back to cpan and install them. For example, if you see an error for a missing package named FOO/Bar, the package name you'll need to specify in cpan is FOO::Bar, i.e.:

sudo cpan
install FOO::Bar
q

No comments: