User:Thackert/Linux Installation Instruction Draft

= Draft for an version independent installation on GNU/Linux =

First time installing LibreOffice on GNU/Linux?
If you have never installed LibreOffice in GNU/Linux or if you are just trying to install LibreOffice to get a job done or to have a working office suite, these instructions are probably not for you.

For normal everyday users we strongly advise that you use your distribution's installation processes, especially those with graphical interfaces. Check your distribution's help for how to do this.

The instructions below are for those who need to install LibreOffice packages directly from our site. This happens if the LibreOffice that comes with your distribution has some configuration options that are undesired, or if you want to run a development or newer version than the one available at the distribution's repositories, or if your distribution has expired and no longer provides up-to-date software versions. If you just want to install one of our provided versions alongside your distribution's version see this wiki page. There is also a script available from our team member Wolfgang Pechlaner to do this, but it is written for SuSe in mind and was only tested on *buntu based systems to work (but may also work on other RPM or DEB based systems), when changing the script adequate. On Debian testing, however, this script spits out an error message regarding a syntax error.

In any case these instructions are void of any liability, and it is strongly advised you do a thorough backup of your data (e.g. your home directory) before proceeding.

There is a script at the bottom of this wiki, to make the whole job much easier. It is written for .deb installers but can be modified for .rpm.

Should I uninstall the LibreOffice that comes with my Distro?
You do not need to uninstall LibreOffice but we strongly advise users to install these packages in a "clean" environment. It should not be a major problem to have as many versions of LibreOffice as you wish, but there are some reported installation problems and there are theoretical problems with conflicts in these cases. Again, nothing bad should derive from this, but it could be the reason for some unexpected hassle.

If you want to uninstall it (either because you have not enough disk space to install two office suites or just want only one installed on your system, please read the section below entitled Uninstalling LibreOffice.

Where to find official installation support?
These instructions are also presented in the "README" file included with the downloaded archive files (look in the "readmes" directory). That official information is maintained by the LibreOffice Documentation Team, and is stored at the following address: http://www.libreoffice.org/welcome/readme.html

Will I have to be a coder / programmer to install LibreOffice?
In most modern GNU/Linux distributions, the desktop is well integrated with the installation process, so it is very likely that if you have a stock Debian or one of its derivatives (Ubuntu, Aptosid, Mint, etc.), Mandriva (or Mageia), openSUSE, or other Freedesktop-compliant complete installation on your system, you could do a full LibreOffice installation without having to type a single line of code.

For those who use KDE, the plot thickens. It seems Adept (when present) has some issues. So, if you encounter problems, please use the Terminal Based Install instructions instead.

Find your installation, language and help packages
Please go to:

http://www.libreoffice.org/download/

Installation packages are available for 32-bit and 64-bit systems, in the “x86” and “x86_64” flavors, respectively, together with language and help packs for obtaining a LibreOffice installation in your preferred language. Download the appropriate package for your system, distribution, and language. Put it anywhere convenient and accessible to you; e.g. in a directory you've created named "LibreOffice" in your home directory.

The rest of this document assumes, that you are installing the base (en-US) package, but if you are also installing a help pack or a language pack, all you need to do is after installing the base (en-US) package, do the same steps all over again with these extra packages.

The instructions are for installing LibreOffice in US English (en-US, the basic installation), on a 32-bit system. There will be differences in some directory and file names if you are installing a different version (i.e. 64-bit, in another language, .deb or .rpm), but the process is basically the same, and – hopefully – you will find these instructions easy to follow.

The download page above – hopefully – will have determined if you are in need of a .deb – for Debian based distributions (Debian, Ubuntu, *buntu, Aptosid, Knoppix, etc...) – or an .rpm based one like Fedora, Mandriva, openSUSE, CentOS, Mageia, and other .rpm systems package. If it doesn't, please use the change? link below the download button to make your selection.

We have put a lot of work on LibreOffice being able to be installed by anyone. So if you have a stock (out of the box) installation of one of the many GNU/Linux distributions, this section is for you. We are assuming that you have already downloaded the appropriate package for your system (if not please read the previous section)

You should be looking at a file called something like:

LibreOffice_ _Linux_x86-deb.tar.gz

(where the " " is something like 4.0.0.3, 5.1.5 or 5.2.2 or someting like that).

NOTE: The file name you end up with can be quite different from these examples; the ".tar.gz" is the common element though. The changes occur if you are running a 64bit system (then it will have a "x86_64" instead of "X86" in its name) or if you are running an RPM based system (then it would contain an "-rpm" instead of "-deb"). The steps needed for each system is discribed in the following paragraphs.

We will try to make as much sense as possible. If any of these instructions won't work for you, we have a detailed "Terminal-based" installation that is guaranteed to work, in the next section.

Unpacking the Tarball

 * Click on your downloaded package (or right-click on it and choose "Open With" and select your preferred unpacking tool).
 * Extract the package to a location, where you have easy access to (a directory in your Home directory would be fine).
 * You should now have a folder that is called something like: LibreOffice_ _Linux_x86-deb/ (remember that names can vary somewhat, as explained earlier).

Installation of Multiple Packages

 * Change into the unpacked folder. In it, you will see some files (hopefully instructions similar to these in a "readme" file) and a DEBS/ (or RPMS/) folder.
 * Change into the last mentioned folder.
 * Select aLL files within this folder.
 * Right-click on them and in the drop-down menu select something like "Open with Package Manager" or "Open with Install Tool" (the wording here is defined by your distribution, desktop environment/manager and/or installed packages).
 * You will be prompted for the root (on Debian and maybe some other distributions) or your user password (when using other distributions with the sudo command).
 * You may be prompted to install dependencies. Generally, the system will tell you if these dependencies will break something, so if you don't see a message that freaks you out, it is OK to say yes here.
 * If all goes well, and you don't see any error messages from your system, it is safe to say we have succeeded. The program is installed now. To be sure you can open a terminal and type

libreoffice

(you could also try "soffice", if this works for you. But be aware: if you want to install any language pack for a different language than en_US and you want to use this language as your GUI language in LibreOffice, do not run this test yet but after your language pack installation. Otherwise, you have to change your language settings after you have installed your langauge pack.). If LibreOffice doesn't start up, see Testing the Installation below.

"Attention: Some users have reported problems while trying to select and install multiple packages with the 'Package Manager' tool of their distribution (specially Ubuntu). Please try to use Synaptic (but this may needs to be installed before, as it is not usually by default) for this step if you encounter problems, or go directly to the Terminal based Install instructions below."


 * Now you can open the LibreOffice suite via your system's Programs > Office menu, and it even could be that LibreOffice is already your default Office Program (click a spreadsheet file to make sure).

Terminal-Based Install
The following instructions are for advanced users or for users who encountered problems during the Graphical Install. We have tested LibreOffice in a lot of distributions. It can be installed in all of them, so these instructions should work. If they don't work for you, we suggest you to follow these steps:


 * Make sure you haven't a corrupt download. Do a checksum, or just try to download the package again.
 * Make absolutely sure you are downloading the package that matches your system. Common errors include trying to install a 64bit package on a 32bit system, or trying to install an .rpm in a .deb based distribution (or the other way around).
 * Make absolutely sure you have root privileges. If not, become root or use sudofirst (required during the installation, not to open and use LibreOffice).

So here is the detailed terminal-based way to install LibreOffice:

Unpack the Downloaded Archive via Terminal
Open a command line (e.g. Konsole, GNOME Terminal, XFCE Terminal etc.) and change to the location where you downloaded the tarball. Now we'll decompress and unpack the package file. You should type:

For the .deb:

tar zxvf LibreOffice_ _Linux_x86-deb.tar.gz
 * Remember, ^--- use your downloaded file-name ---^ here.

For the .rpm:

tar zxvf LibreOffice_ _Linux_x86-rpm.tar.gz

When you have unpacked the downloaded archive, you will see that the contents have been decompressed into a directory called something like "LibreOffice_ _Linux_x86-deb" (or -rpm) (with naming differences depending on what you have downloaded).

Installing via Terminal
Change to the unpacked directory:

For the .deb

cd LibreOffice_ _Linux_x86-deb/

For the .rpm

cd LibreOffice_ _Linux_x86-rpm/

The "LibreOffice_ _Linux_x86-deb" (or rpm) directory contains a sub-directory called DEBS/ (or RPMS/). Change to this directory

cd DEBS/

or

cd RPMS/

Enter the following command to have your system incorporate and recognise the installation (you will be prompted to enter your root (on Debian and possibly on some other distributions) or user password (when using sudo) before the command will be executed):

Debian / Ubuntu / Mint
sudo dpkg -i *.deb

(if you are using a distribution, where sudo is not installed, you need to install and configure sudo first to use it. If you do not want to install it, use "su -c 'dpkg -i *deb'".)

Fedora / CentOS
su -c 'yum install *.rpm'

Mandriva / Mageia
su -c 'urpmi *.rpm'

openSUSE and other RPM based systems
su -c 'rpm -Uvh *.rpm'

Gentoo
A binary LibreOffice is available in the portage repository:


 * 1) emerge libreoffice-bin

http://packages.gentoo.org/package/app-office/libreoffice-bin

Testing the Installation
The above commands do the first part of the installation process. Make sure we succeeded by calling:

libreoffice

or perhaps

libreoffice

or just only

soffice

You should see the LibreOffice splash screen if all went well. But be aware: if you want to install any language pack to use LibreOffice in that language, please wait with this test until you have installed it.

If LibreOffice doesn't fire up, the command name may have been changed. Type an abbreviated part of the likely name, for example:

libreof

then hit [Tab] to see if the complete command name comes up. If so, just hit [Enter] to try it. If that didn't work, look at your GUI screen's Menu > Office segment. It may already be available there.

Otherwise, you can go back to our internet documentation or forum pages for help.

Note: the ppa at https://launchpad.net/~libreoffice/+archive/ppa is now almost always in sync with upstream, so please use that version whenever possible.

The installation process is now completed, and you should have icons for all the LibreOffice applications in your desktop's Applications > Office menu.

Other Distributions
It should be easy to install LibreOffice on other GNU/Linux distributions not specifically covered in these installation instructions. Besides the .deb and .rpm we make it possible to download source code  tarballs from http://www.libreoffice.org/download/. There are also repositories for several distributions which provides newer LibreOffice version than the main repository. Chances are that there is already an repository for your distribution and it may be easier to add it to your distribution.

Setting Up a Language Pack
After you installed your language pack (follow the same instructions as described in Installing the main (en-US) pack. you will need to set up your LibreOffice suite so it will recognize your language.

Start one of the LibreOffice applications – Writer, for instance. Go to the menu and select.

In the Options dialog box, click on Language Settings and then click on Languages. Open the User interface list and select the language you just installed. If you want, do the same thing for the Locale setting, the Default currency, and the Default languages for documents.

After adjusting those settings, click on OK. The dialog box will close, and you will see a dialog which will offer you the possibility to restart LibreOffice so your changes will be taken over.

The next time you start LibreOffice, it will start in the language you just have chosen. For example if you installed pt-Br (Brazilian Portuguese) when you start your LibreOffice, the splash screen will show the all familiar LibreOffice. Nice isn't it?

Installing a help pack
If you do not want to connect to the internet when you press the F1 key or go to Help - LibreOffice Help, you could install LibreOffice's offline help. Do do this, you just need to download the package in your preferred language from our download page, unpack it and install it. It is nearly the same as installing a language package, so see the instructions there.

Uninstalling LibreOffice
Uninstalling a previous version when you install an upgraded one helps to prevent conflicts. Usually upgrades are dealt with by the same tool that deals with updates but this seldom works for alpha or beta testing or pre-release versions.

As seen in the installation process, GNU/Linux distributions have come a long way to make uninstalling software as easy as possible.

Open your system's package manager and find the search tool.

Search for libreoffice.

Deselect or select the first package found for removal. The package manager tool will (hopefully) ask you if it should remove other dependent packages. As we of LibreOffice packed all we needed in our installation packages, it should be pretty safe to say yes.

Then scroll the list of the search box again to see if all the libreoffice packages are deselected / selected for removal, if you find any of them still not deselected / selected for removal, select them, and continue to remove them until all are removed (in testing environments it was necessary no more than 3 of these steps).

At some point you will be prompted to uninstall packages that start with libobasis , it is recommended that you uninstall these too (if you are not prompted, do a search with the term libobasis  to see if you find anything). You may also see other packages like python3-uno or ure. If so, you should uninstall them, too.

After you apply these changes the LibreOffice suite should have been removed from your system. To make sure try to find any menu entries, and to be double sure type in a terminal:

libreoffice

or

soffice

If the LibreOffice splash screen appears you can try to find any packages left behind in the package manager. If you made double sure there aren't any, do a reboot and try the above command again.

After you have uninstalled all the packages and the above command returns no error message but does block your command prompt or you see something like "LibreOffice cannot be started" (with an error message about a missing library, program module or the like), you could try to see if LibreOffice left anything behind: To ensure the cleanest possible removal of a previous installation of LibreOffice, you can optionally also execute the following command in a terminal window, and then manually delete any remaining files discovered:

locate libreoffice | less

or

find / -name "libreoffice" -print 2>/dev/nul

Skipping this optional step will not have any serious consequences for your system (not even for a future install or upgrade to LibreOffice). You will just have a small number of obsolete files taking up a very small amount of disk space.


 * If you tried all of the above and could not uninstall or had any problems, we will have to go to a terminal to fix this.

Debian / Ubuntu
su -c 'apt-get purge libreoffice? python3-uno'

(and possibly others as well. Run this command, and if you see any other packages for removal, press "n" to stop the uninstallation process and add these additional package(s) to the command above).

or

sudo aptitude purge libreoffice? python3-uno


 * Remember to put the "?" wild-card so ALL the LibreOffice packages get purged / uninstalled.

Fedora
su -c 'yum remove libreoffice*'

Mandriva
su -c 'urpme libreoffice*'

openSUSE and other RPM based systems
su -c 'rpm -ev --allmatches libreoffice'

Script For Installing
Mr ZenWiz from the User Support Mailing List kindly wrote a script to do the whole job for Debian based distros such as Mint, Ubuntu and many others. For people using the Redhat Package Management system the script needs a little editing. Hopefully at some point we might have both scripts here.