How to install LibreOffice 5.1 in Ubuntu 14.04

Normally when you install Ubuntu 14.04 and update everything what was possible you have LibreOffice 4.2.8.2 (version for today). When you run Software Updater system will not find the newer version. So how to install LibreOffice 5.1 in Ubuntu? Just create a file:

Type in terminal

Shell

1

sudo gedit/etc/apt/preferences.d/libreoffice.pref

Paste these lines and save the file (remember about root privileges):

Perl

1

2

3

Package:*

Pin:releaseo=LP-PPA-libreoffice

Pin-Priority:700

Then open terminal again and run this command in order to add LibreOffice 5 ppa: