I’ve already wrote in my

Lithuanian blog about 33 leading developers leaving OpenOffice.org project and building a fork named LibreOffice after Oracle bought Sun. Unfortunately, LibreOffice is not yet included in default repositories of current Linux-based operating systems – Fedora 14 is not an exception. LibreOffice will replace OpenOffice.org in version 15. As my current efforts shown there might be some problems installing LibreOffice on Fedora 14 which are explained here.

Remove OpenOffice.org

If OpenOffice.org is installed, removal is necessary. Typical command to install it from updates repository is:

[code lang=”shell”]yum install openoffice.org-writer openoffice.org-impress openoffice.org-base openoffice.org-calc openoffice.org-draw openoffice.org-math[/code]

Therefore removal has to deal with the same packages:

[code lang=”shell”]yum remove openoffice.org-writer openoffice.org-impress openoffice.org-base openoffice.org-calc openoffice.org-draw openoffice.org-math[/code]

Notice core and two more OpenOffice.org packages which are not removed with previous command so you need to get rid of them:

[code lang=”shell”]yum remove openoffice.org-core openoffice.org-opensymbol-fonts openoffice.org-ure[/code]

Install LibreOffice

Current version of LibreOffice ar the time of this article was 3.3.2 Final, released March 22, 2011. In download page you have to select appropriate architecture which in my example is Linux x86 (rpm). Let’s download archived installation packages and help files and extract them on dedicated folder, e. g. /home/username/libreoffice. Then open up terminal and change direcory into that folder’s subfolder RPMS:

[code lang=”shell”]cd ~/libreoffice/LibO_3.3.2rc2_Linux_x86_install-rpm_en-US/RPMS[/code]

All necessary packages will be installed by executing:

[code lang=”shell”]yum install *.rpm –nogpgcheck[/code]

Now you need shortcuts to LibreOffice programs on your application menu. Accomplish this by executing these two commands:

[code lang=”shell”]cd desktop-integration
rpm -ivh libreoffice3.3-redhat-menus-3.3-202.noarch.rpm[/code]

LibreOffice is now installed. When I first tried to open any application of this package, I’ve seen loading screen which disappeared without launching a program. The most interesting part starts searching for solution.

Install Sun/Oracle Java version

After reading many posts on forums one possible solution came up: Fedora is distributed with open version of Java – OpenJDK. Several people who installed OpenOffice.org or LibreOffice manually (not from repository) made it work by installing Sun/Oracle’s Java version. As we all know, Open/LibreOffice requires Java to work.

Then I remembered my efforts to install OpenOffice.org 3.2 (which then was latest version) on Fedora manually and that led me to same situation – loading screen won’t bring the application up. Without even searching for a solution I installed older version straight from repository. I belive repository version is compatible with OpenJDK while manual installation probably not. This was needed to test.

Installation of Sun/Oracle’s Java is explained in detail on Java website so I’m mentioning only commands.

First of all, download installation package named jre-6u24-linux-i586-rpm.bin. As always on my guides, create a dedicated folder, e. g. /home/username/java. Then open terminal and execute these commands:

[code lang=”shell”]cd ~/java
chmod +x jre-6u24-linux-i586-rpm.bin
sh jre-6u24-linux-i586-rpm.bin
alternatives –install /usr/bin/java java /usr/java/jre1.6.0_24/bin/java 20000
alternatives –install /usr/bin/javaws javaws /usr/java/jre1.6.0_24/bin/javaws 20000[/code]

Now default system Java has to be set. In other words, applications has to use Sun/Oracle Java instead of OpenJDK. Execute:

[code lang=”shell”]alternatives –config java[/code]

And type in number of desired version. As far as I remember, Oracle’s is the last one.

Also environment variable has to be set in /etc/profile or $HOME/.bash_profile file by executing:

[code lang=”shell”]export JAVA_HOME="/usr/java/jdk1.6.0_24"[/code]

More information about Java installation can be found on this guide. Unfortunately after Sun/Oracle Java installation LibreOffice behaved exactly the same. Even though Java installation is not the solution, I’m sharing it in case anyone experiences problems with OpenJDK 😉

Problem solution: delete old settings

One of great ways to discover errors is launching application from terminal when any startup errors are displayed in command line output. LibreOffice echoed this error (fragment):

Aborted “$sd_prog/$sd_binary” “$@”

It was rather difficult to find a solution by searchning with this message. Luckily, on Ubuntu forums a message was found saying that LibreOffice installation creates incorrect ownerships for settings files and folder on user’s home directory. To try this I ran LibreOffice as root – hooray, program runs! This confirms ownership problem.

According to message author, all you need to do is delete .libreoffice (or .openoffice.org for OpenOffice.org installations) or simply chown this directory with your username. My home directory had both folders as I was previously using OpenOffice.org, so I deleted both. After that LIbreOffice successfully launched. Once again, thanks, Ubuntu forum! 😀 Even if you’re under Red Hat, Ubuntu community is a place to check.

In case you need to execute any LibreOffice application from terminal, whole suite is located at /opt/libreoffice.