Updated 6 April 2007.
Most of this information is taken from this thread, which I posted previously: http://www.ubuntuforums.org/showthread.php?p=2349049
Ubuntu 7.04 Feisty Fawn ships with OpenOffice.org 2.2, but what if you want to install Openoffice.org 2.2 on Ubuntu 6.10 Edgy Eft over the standard OpenOffice.org 2.0 that ships with it? It's very simple; read on to find out how.
PURPOSE: Every once in a while, somebody asks about how to install a more recent version of OpenOffice.org, which is VERY EASY TO DO. This HOWTO will covers an easy method for installing OpenOffice.org 2.2.
I tested this on my Ubuntu 6.10 Dell Inspiron 9300, x86 processor.
If you are a beginner and would like detailed instructions, read on (these instructions are long and intended for absolute beginners). If you just want to see the commands, skip to the bottom, I wrote them out there for easy copy & paste action.
NB: I am assuming that you're system is up-to-date, i.e. you have installed all packages recommended by the update manager.
Step 0 - Remove OpenOffice.org 2.0
Remove all applications associated with the default OpenOffice.org 2.0 that is in the standard repositories for Ubuntu 6.10. Copy and paste the following command into the terminal to uninstall all OOo packages and those depending on them (if you are uncomfortable with this, follow the directions below the command):
Code:
sudo aptitude remove openoffice.org-base openoffice.org-calc openoffice.org-math openoffice.org-draw openoffice.org-impress openoffice.org-writer openoffice.org-xsltfilter openoffice.org-testtool openoffice.org-thesaurus-en-us openoffice.org-style-default openoffice.org-style-industrial openoffice.org-evolution openoffice.org-emailmerge openoffice.org-gnome openoffice.org-onlineupdate openoffice.org-pyuno openoffice.org-l10n-common openoffice.org-l10n-en-gb openoffice.org-l10n-en-za openoffice.org-kde-integration openoffice.org-java-common openoffice.org-javafilter openoffice.org-gtk openoffice.org-gnome openoffice.org-gnome-integration openoffice.org-graphicfilter openoffice.org-common openoffice.org-core openoffice.org-core01 openoffice.org-core02 openoffice.org-core03 openoffice.org-core03u openoffice.org-core04 openoffice.org-core04u openoffice.org-core05 openoffice.org-core05u openoffice.org-core06 openoffice.org-core07 openoffice.org-core08 openoffice.org-core09 openoffice.org-core10 openoffice.org openoffice.org-help-en-us ubuntu-desktop language-support-en python-uno thunderbird-locale-en-gb
Alternately, to remove all those applications using a graphical package manager follow these directions:
- Press <Alt>+<F2> and type gksudo synaptic. This will open Synaptic Package Manager.
- Click the "Search" button in the menu bar.
- In the "Search:" field, type "openoffice" and in the "Look in:" field, select "Name". Press the "Search" button.
- For each package with a green box (meaning it is already installed) right click on the package name and select "Mark for Removal".
- Search for each of the following packages and mark them for removal as you did to the packages in the previous step (if they are not installed, don't worry about them):
- ubuntu-desktop
- language-support-en
- thunderbird-locale-en-gb
- python-uno
- Everything should be correctly uninstalled now.
Step 1 - Install JRE
Install the Sun Java Runtime Environment 5 (JRE) (NB: This is non-free software! If you are concerned about keeping your Ubuntu free [as in speech], then you'll have to find yourself a different HOWTO, or different office software). OpenOffice.org uses it.
First, you need to enable the "multiverse" software repository, which provides access to packages whose use or source code may be restricted by copyright laws or other legal issues. It will all still be completely free [as in costless] for you to download and use. To enable the multiverse sowftware repository, click on System > Administration > Software Sources. Ensure that the checkbox next to "Software restricted by copyright or legal issues (multiverse)" is selected. (As a side note, you may want to enable the "universe" repository as well, which gives you access to many, many community-supported programs). Press the "Close" button and agree to "Reload" you're package list when prompted. You may "reload" your package list at any time by typing this into the terminal:
Code:
sudo aptitude update
Now you can install Java packages. Type the following code into the terminal:
Code:
sudo aptitude install sun-java5-bin sun-java5-jre
You'll have to install a couple of other packages on which the JRE depends. Press yes through all the goofy license agreements (or be a proactive, productive citizen and read them first).
Step 2 - Install alien
Install the program alien, which converts .rpm packages to .deb packages (i.e. it makes such packages usable in Debian-based Linux distributions such as Ubuntu). Type the following in the terminal:
Code:
sudo aptitude install alien
Agree to install all the dependencies for alien as well, if necessary.
Step 3 - Download OpenOffice.org 2.2
Download OpenOffice.org 2.2 from the official download website (http://download.openoffice.org/2.2.0/index.html). Click "Download OpenOffice.org". UNCHECK the little box that says "Include the Java JRE with this download". If you want to, I guess you can include it, but it's unnecessary because we installed it in step 1
. The download is pretty big (about 120MB) so it may take a while. Make a sandwich.
Step 4 - Unpack and install OpenOffice.org 2.2
Change to the directory in which the file OOo_2.2.0_LinuxIntel_install_en-US.tar.gz is saved. For example, if it is saved in your home directory, type the following in the terminal:
Type the following code in your terminal to extract the contained files from the tarball archive:
Code:
tar xzvf OOo_2.2.0_LinuxIntel_install_en-US.tar.gz
Change to the directory that you just unpacked, with the long, goofy name:
Code:
cd OOF680_m14_native_packed-1_en-US.9134/
There should be three directories in this folder, licenses/, readmes/, and RPMS/. Change to the RPMS/ directory:
Convert all the .rpm packages into .deb packages using alien (Ubuntu uses .deb packages to install programs, not .rpm packages). Type the following command into the terminal:
Code:
sudo alien --scripts --keep-version -d *.rpm
This might take a while. Make another sandwich. The --scripts option preserves pre- and post-installation scripts associated with the .rpm package (if you don't include it, alien will give you a warning). The --keep-version option prevents alien from adding one to the minor version number of the package (i.e. the package openoffice.org-core10-2.2.0-9134.i586.rpm, after being converted would have version number 2.2.0-9135), which is its default behavior. The -d parameter tells alien to convert the .rpm packages to .deb packages.
Finally install all the .deb packages. Type the following command into the terminal:
This will install the entire OpenOffice.org suite. This also might take a while, make a sandwich (or half, if you're getting full).
When all those packages are installed, change to the desktop-integration folder. Type the following in the terminal:
Code:
cd desktop-integration/
Install the OpenOffice.org menu items. Type the following in the terminal:
Code:
sudo dpkg -i openoffice.org-debian-menus_2.2-9119_all.deb
OpenOffice.org 2.2 suite is now installed system-wide! It is installed in the folder /opt/openoffice.org2.2/. The actual binaries are in the folder /opt/openoffice.org2.2/program/, so to start Writer, for example, type the following in the terminal:
Code:
/opt/openoffice.org2.2/program/swriter
The other programs are have similar appellations: sbase, scalc, sdraw, etc. The "s-" prefix is an artifact from StarOffice, from which OpenOffice is descended.
The entire suite and all its libraries are self-contained in the /opt/openoffice.org2.2/ folder. Technically, if you don't want the programs accessible to all users, you can simply move that folder to somewhere in your home directory (or wherever) by typing the following command in the terminal:
Code:
sudo mv /opt/openoffice.org2.2 ~
This is totally optional, though.
Step 5 - Creating symbolic links (optional)
To be able to start the programs contained in the suite, you probably want to be able to type a very short command instead of the very long one given above. To do this, we can use a symbolic link, which is something that points to a file located somewhere else in the file system. The syntax for a symbolic link looks like this:
Code:
ln -s targetfilename symboliclinkname
Link the command swriter in the directory /usr/bin/ (so that you can just type swriter at the command prompt to start Writer) to the actual binary for Writer, located at /opt/openoffice.org2.2/program/swriter (or ~/openoffice.org2.2/program/swriter if you moved the installation from its original location). Type the following into the terminal:
Code:
sudo ln -s /opt/openoffice.org2.2/program/swriter /usr/bin/swriter
Repeat this at your leisure for each program in the suite; just replace swriter with sbase, scalc, etc. in both places in the above command.
Success (hopefully)! Press <Alt>+<F2> and then type swriter to see if you linked correctly. OpenOffice.org 2.2 Writer should open. If you don't believe the splash screen that says in big letters "OpenOffice.org 2.2", you can choose Help>About and take a look at the version number.
~~~~~~~~~~
A couple extras
~~~~~~~~~~
For those who don't want to read all that, here's just the commands for my installation of OOo2.2. Note that I am removing packages from a previous installation by this method, you need only worry about removing openoffice.org-* packages that are installed on your system. Note also that if the download fails or is slow or something, just go to http://www.openoffice.org/ and download the file manually (because this is just one of the mirrors that OpenOffice.org uses to distribute their files).
Code:
sudo aptitude remove openoffice.org-base openoffice.org-calc openoffice.org-writer openoffice.org-xsltfilter openoffice.org-math openoffice.org-draw openoffice.org-impress openoffice.org-testtool openoffice.org-thesaurus-en-us openoffice.org-style-default openoffice.org-style-industrial openoffice.org-evolution openoffice.org-emailmerge openoffice.org-gnome openoffice.org-onlineupdate openoffice.org-pyuno openoffice.org-l10n-common openoffice.org-l10n-en-gb openoffice.org-l10n-en-za openoffice.org-kde-integration openoffice.org-java-common openoffice.org-javafilter openoffice.org-gtk openoffice.org-gnome openoffice.org-gnome-integration openoffice.org-graphicfilter openoffice.org-common openoffice.org-core openoffice.org-core01 openoffice.org-core02 openoffice.org-core03 openoffice.org-core03u openoffice.org-core04 openoffice.org-core04u openoffice.org-core05 openoffice.org-core05u openoffice.org-core06 openoffice.org-core07 openoffice.org-core08 openoffice.org-core09 openoffice.org-core10 openoffice.org openoffice.org-help-en-us ubuntu-desktop language-support-en python-uno thunderbird-locale-en-gb
wget http://openoffice.mirror.infinitaus.com/stable/2.2.0/OOo_2.2.0_LinuxIntel_install_en-US.tar.gz
sudo aptitude install sun-java5-jre sun-java5-bin alien
tar xzvf OOo_2.2.0_LinuxIntel_install_en-US.tar.gz
sudo alien -d OOF680_m14_native_packed-1_en-US.9134/RPMS/*.rpm
sudo alien --scripts -d OOF680_m14_native_packed-1_en-US.9134/RPMS/openoffice.org-core10-2.2.0-9134.i586.rpm
sudo dpkg -i OOF680_m14_native_packed-1_en-US.9134/RPMS/*.deb
sudo dpkg -i OOF680_m14_native_packed-1_en-US.9134/RPMS/desktop-integration/openoffice.org-debian-menus_2.2-9119_all.deb
sudo ln -s /opt/openoffice.org2.2/program/swriter /usr/bin/swriter
sudo ln -s /opt/openoffice.org2.2/program/sbase /usr/bin/sbase
sudo ln -s /opt/openoffice.org2.2/program/scalc /usr/bin/scalc
sudo ln -s /opt/openoffice.org2.2/program/smath /usr/bin/smath
sudo ln -s /opt/openoffice.org2.2/program/sdraw /usr/bin/sdraw
sudo ln -s /opt/openoffice.org2.2/program/simpress /usr/bin/simpress
sudo ln -s /opt/openoffice.org2.2/program/soffice /usr/bin/soffice
sudo ln -s /opt/openoffice.org2.2/program/spadmin /usr/bin/spadmin
~~~~~~~~~~
To uninstall OpenOffice.org 2.2, simply uninstall all packages starting with openoffice.org- that are currently installed on your system. Follow the instructions at step 0 above, copied here for convenience:
Code:
sudo aptitude remove openoffice.org-base openoffice.org-calc openoffice.org-math openoffice.org-draw openoffice.org-impress openoffice.org-writer openoffice.org-xsltfilter openoffice.org-testtool openoffice.org-thesaurus-en-us openoffice.org-style-default openoffice.org-style-industrial openoffice.org-evolution openoffice.org-emailmerge openoffice.org-gnome openoffice.org-onlineupdate openoffice.org-pyuno openoffice.org-l10n-common openoffice.org-l10n-en-gb openoffice.org-l10n-en-za openoffice.org-kde-integration openoffice.org-java-common openoffice.org-javafilter openoffice.org-gtk openoffice.org-gnome openoffice.org-gnome-integration openoffice.org-graphicfilter openoffice.org-common openoffice.org-core openoffice.org-core01 openoffice.org-core02 openoffice.org-core03 openoffice.org-core03u openoffice.org-core04 openoffice.org-core04u openoffice.org-core05 openoffice.org-core05u openoffice.org-core06 openoffice.org-core07 openoffice.org-core08 openoffice.org-core09 openoffice.org-core10 openoffice.org openoffice.org-help-en-us ubuntu-desktop language-support-en python-uno thunderbird-locale-en-gb
Bookmarks