From: http://dubinko.info/blog/2004_01_01_archive.html
Over on DreamHost, I'm setting up for some Python+XML processing.
Since they run an older version of Python and libxml2 (and no libxslt that I can see), I compiled and installed local copies of Python 2.3.3, libxml2 2.6.4, and libxslt 1.1.2. Fun experience.
I haven't done much remote administration, especially without root access. It goes like this:
wget (URL to tarball)
tar -xzv (file just downloaded)
cd (directory just created)
./configure (lots of switches, see below)
make
make install
And you're done.
The two most important switches for configure are --prefix=(path to home)/local and --exec-prefix=(path to home)/local. I used these every time, compiling Python first. Next, compiling libxml2, I had to add --with-python=(path to home)/local/bin/python. Finishing with libxslt, I needed all of the above, plus --with-libxml-libs-prefix=(path to home)/local --with-libxml-include-prefix=(path to home)/local --with-libxml-prefix=(path to home)/local. Whew! Makes for quite a command line, but it works.
local/bin/python
>>>import libxml2
>>>
Update: on DreamHost (as with all providers running suexec) you need to do a chmod 755 on the script files AND the containing directory, otherwise you will only get a 500 page with a misleading "Premature end of script headers" message in the server log. (It's also possible that your headers really are messed up, or possibly you have non-Unix line feeds, but at least you can narrow it down.)
-m
Over on DreamHost, I'm setting up for some Python+XML processing.
Since they run an older version of Python and libxml2 (and no libxslt that I can see), I compiled and installed local copies of Python 2.3.3, libxml2 2.6.4, and libxslt 1.1.2. Fun experience.
I haven't done much remote administration, especially without root access. It goes like this:
wget (URL to tarball)
tar -xzv (file just downloaded)
cd (directory just created)
./configure (lots of switches, see below)
make
make install
And you're done.
The two most important switches for configure are --prefix=(path to home)/local and --exec-prefix=(path to home)/local. I used these every time, compiling Python first. Next, compiling libxml2, I had to add --with-python=(path to home)/local/bin/python. Finishing with libxslt, I needed all of the above, plus --with-libxml-libs-prefix=(path to home)/local --with-libxml-include-prefix=(path to home)/local --with-libxml-prefix=(path to home)/local. Whew! Makes for quite a command line, but it works.
local/bin/python
>>>import libxml2
>>>
Update: on DreamHost (as with all providers running suexec) you need to do a chmod 755 on the script files AND the containing directory, otherwise you will only get a 500 page with a misleading "Premature end of script headers" message in the server log. (It's also possible that your headers really are messed up, or possibly you have non-Unix line feeds, but at least you can narrow it down.)
-m