How to: Install Subversion on 64-bit shared host like Bluehost

This is more for me, than for you.   Subversion does not compile flawlessly on bluehost, because it seems they are using a 64-bit OS.

$ uname -a
Linux […] 2.6.26-3_5.BHsmp #1 SMP Fri Aug 29 12:43:21 MDT 2008 x86_64 x86_64 x86_64 GNU/Linux

Here’s what worked for me, after consulting numerous sources:

  1. mkdir ~/src
    cd ~/src
    wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
    wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz
    tar -xzvf subversion-1.4.6.tar.gz
    tar -xzvf subversion-deps-1.4.6.tar.gz
    cd subversion-1.4.6
  2. cd apr
    ./configure ––enable-shared ––prefix=$HOME/system
    make && make install
  3. cd ../apr-util
    ./configure ––enable-shared ––prefix=$HOME/system \
    ––with-expat=builtin ––with-apr=$HOME/system \
    ––without-berkeley-db
    make && make install
  4. cd ../neon
    EXTRA_CFLAGS=”-L/usr/lib64 -fPIC”
    CFLAGS=”-L/usr/lib64 -fPIC”
    ./configure ––prefix=$HOME/system ––enable-shared
    make && make install

    The 64-bit flag fixes these errors
    src/subversion-1.5.2/neon/src/.libs/libneon.a: could not read symbols: Bad value

    /usr/lib/libexpat.so: could not read symbols: File in wrong format

  5. cd ..
    ./configure -––prefix=$HOME/system ––without-apxs ––with-expat=builtin
    make && make install

    –without-apxs fixes this error: “cp: cannot create regular file `/usr/local/apache/modules/mod_dav_svn.so’: Permission denied “

See also:

  1. bluehost forums: “svn repository on bluehost”
  2. Justball.com: Setting up Subverison on Bluehost
  3. Joemaller.com: How to install Subversion on a shared host

Leave a Reply