ch0wned – Installing Open Office 3.4 as non-root in your home directory for Redhat RHEL 5

Written by max on 2012-12-03

Introduction

This is a brief guide to help you to install a newer version of Open Office on your Linux box w/out root access. For example, you could be installing into your home directory. Things have gotten a lot easier since the RHEL4 days.

Procedure

Basic Non-Root Install from RPMs

  1. Download the RPM-based install for your distro and architecture. Example : Apache_OpenOffice_incubating_3.4.1_Linux_x86-64_install-rpm_en-US.tar.gz
  2. Unzip the Tar ball into the place you want to install Open Office
    mkdir ~/oo_3.4
    cd ~/oo_3.4
    tar xvfz ~/Downloads/Apache_OpenOffice_incubating_3.4.1_Linux_x86-64_install-rpm_en-US.tar.gz
  3. Uncompress all the RPMs
    #!/bin/sh

    for i in `find . -name "*.rpm"`; do
    echo $i
    rpm2cpio $i | cpio -ivd
    done

  4. Run Open Office
    ~/oo_3.4/opt/openoffice.org3/program/soffice

Incompatible GLIBC version for RHEL5 and Open Office 3.4

If the above fails you may have an older version of GLIBC than the version used to compile it. You’ll then get a lot of errors like this:
oo_3.4.1/opt/openoffice.org3/program/../basis-link/ure-link/bin/javaldx: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by oo_3.4.1/opt/openoffice.org/ure/bin/../lib/libuno_sal.so.3)
oo_3.4.1/opt/openoffice.org3/program/../basis-link/ure-link/bin/javaldx: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by oo_3.4.1/opt/openoffice.org/ure/bin/../lib/libxml2.so.2)
oo_3.4.1/opt/openoffice.org3/program/soffice.bin: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by oo_3.4.1/opt/openoffice.org3/program/../basis-link/ure-link/lib/libuno_sal.so.3)
oo_3.4.1/opt/openoffice.org3/program/soffice.bin: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by oo_3.4.1/opt/openoffice.org3/program/../basis-link/program/libsvt.so)
oo_3.4.1/opt/openoffice.org3/program/soffice.bin: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by oo_3.4.1/opt/openoffice.org3/program/../basis-link/program/libsvt.so)
oo_3.4.1/opt/openoffice.org3/program/soffice.bin: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by oo_3.4.1/opt/openoffice.org3/program/../basis-link/program/libvcl.so)
oo_3.4.1/opt/openoffice.org3/program/soffice.bin: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by oo_3.4.1/opt/openoffice.org3/program/../basis-link/program/../ure-link/lib/libxml2.so.2)

In this case you will need to use a special version that is compiled by an older version of GCC, as is used in RedHat EL5 (RHEL5) / CentOS 5
This Bug : https://issues.apache.org/ooo/show_bug.cgi?id=119385 has the details.

The repository for the version you want is here http://people.apache.org/~arielch/packages/r1372282-glibc-2.5/. The added bonus is there are “full archived sets” that don’t require the RPM step. I used this file to install.

cd ~/oo_3.4
tar xvfz Apache_OpenOffice_incubating_3.4.1_Linux_x86-64_install-arc_en-US.tar.gz

Creating a custom wrapper shell script

If you are using my run_gapp script and custom environment you can create a small wrapper script. This will get you newer version of various dependencies and should render fonts better, all without making changes as root. This is good for networked installs for big groups too. I call the script soffice.wrap

#!/bin/sh

# Wrap the Open Office Verison in home dir w/ the library wrapper for the same enviorn

H=/home/you/el5
SOFFICE=$H/oo_3.4/openoffice.org3/program/soffice

case `basename $0` in
sbase) A=-base;;
scalc) A=-calc;;
sdraw) A=-draw;;
simpress) A=-impress;;
smath) A=-math;;
swriter) A=-writer;;
*) A='';;
esac

exec $H/bin/run_gapp $SOFFICE $A "$@" &

Then create the simlinks to match
cd ~/el5/bin
ln -s soffice.wrap sbase
ln -s soffice.wrap scalc
ln -s soffice.wrap sdraw
ln -s soffice.wrap simpress
ln -s soffice.wrap smath
ln -s soffice.wrap swriter

Make sure you do a chmod +x soffice.wrap.