Getting the LibreOffice Packages
Rather than using the outdated Ubuntu build, go straight to the source and grab the latest LibreOffice from its pre-release downloads page. Currently the newest version is 4.0 RC1 (curiously already tagged with a 4.0.0.1 version number, however). Next, extract the new LibreOffice to a new folder. You’ll be running it right from there, so select a folder you generally use to hold scripts and other programs (I use ~/bin for this purpose). Use your GUI archive manager, or the following command will do the trick:
You’ll now have a directory with the same name as the archive you downloaded (mine was “LibreOffice_4.0.0.1_Linux_x86-64_deb”). Beneath this directory, you’ll have two sub-folders: DEBS and readmes. The “DEBS” folder has (naturally) the Debian packages created by the LibreOffice project. You may be tempted to install these directly, but don’t! These have a higher version number then those from the Ubuntu repositories, and installing them will overwrite your stable installation. Instead, we’re going to unpack them without installing them using the normal Debian package tools.
Installation
Instead of the usual command (dpkg -i) to install DEB packages, we’re going to be using another of the Debian package management utilities. dpkg-deb is a command for getting information on DEB-format packages, including inspection of control files (you do remember what these files are, don’t you?) as well as building a DEB file from a properly formatted directory tree. The “-x” flag is what we want here, as it allows us to extract the file tree from within the packages. Go to the directory where you want LibreOffice installed, then run the following command (and run it exactly as is): The above is actually a series of Bash commands. Their meaning is as follows: When you’re finished with your command you should have a new “opt” folder in your current directory.
You can run the new LibreOffice at this point by travelling down into the “opt/libreoffice4.0/program/” folder, and running the following command: However, you might want to point this test installation at a new user profile, so you won’t mess up anything with your stable install. Open the “opt/libreoffice4.0/program/bootstraprc” file with a text editor, look for the “UserInstallation=” setting, and replace the “$SYSUSERCONFIG” portion of it with “$ORIGIN/..” (which places it in the directory above the base of the LibreOffice install). My profile is placed alongside the “opt/” directory created earlier. This self-contained results will allow you to test and install the new LibreOffice (and don’t forget to submit those bug reports).