Install uLibTidy on Mac OS X
Posted in Web Development - No Comments »
I’ve had some issues getting LibTidy and uTidyLib (Python wrapper) installed and figured I would post my solution as I saw zero Google results on this.
The error I kept getting was:
OSError: Couldn’t find libtidy, please make sure it is installed.
Here’s how I found how to get around this, if you have a better solution please post in comments.
First install LibTidy from source:
cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy
cd tidy
sh build/gnuauto/setup.sh
./configure
make && sudo make install
This places LibTidy in /usr/local/lib. Unfortunately uLibTidy doesn’t recognize the generated library. A simple symlink will fix the problem:
sudo ln -s /usr/local/lib/libtidy.dylib /usr/local/lib/libtidy.so
Now uLibTidy is able to find LibTidy:
In [1]: import tidy
Good luck! If you’re still having issues make sure /usr/local/lib is in your $PATH environment variable.