config:libreoffice
This is an old revision of the document!
Table of Contents
LibreOffice installation
PPA of the latest stable release
sudo add-apt-repository ppa:libreoffice/ppa sudo apt-get update
- /etc/apt/sources.list.d/libreoffice-ppa-focal.list
deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal main deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal main
PPA of pre-release/beta releases
sudo add-apt-repository ppa:libreoffice/libreoffice-prereleases sudo apt-get update
- /etc/apt/sources.list.d/libreoffice-prereleases-ppa-focal.list
deb http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu focal main deb-src http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu focal main
Manual install of latest version
Linux Mint DE2 comes with LibreOffice v4.x and Linux Mint 18 comes with LibreOffice 5.x. Version 6.0 was released in January 2018. To install the latest version, a few simple steps need to be performed to uninstall the version from the repository and download and install the latest version.
Official Download Page:
https://www.libreoffice.org/download/download/?type=deb-x86_64&lang=en-GB
sudo apt-get remove libreoffice-core uno-libs3 ure fonts-opensymbol #for major version upgrades, remove the previous libreoffice version, e.g.: #sudo apt-get remove libreoffice6.0* On Linux Mint 19.2: #sudo apt-get remove libreoffice-*
Bash shell script to install or update latest version:
- libupdate.sh
#!/bin/sh if [ $LOGNAME != "root" ]: then echo "LibreOffice updater needs to be run as root!" exit fi #get latest libreoffice version number for deb-x86_64 packages #use head -n 2 if stable version is preferred url=$(curl -s "https://www.libreoffice.org/download/download/" \ | grep "option.*type=deb-x86_64\&" | head -n 1 | cut -d '"' -f 2 | tail -n 1) #get latest libreoffice version on web lo_ver=$(echo "$url" | sed 's/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/') #get main version number i.e 6.2 to get binary part lo_main_ver=$(echo "$url" | sed 's/.*\([0-9]\.[0-9]\)\.[0-9].*/\1/') #get installed binary version number if hash libreoffice 2>/dev/null; then current_lo_v=$(libreoffice --version) else current_lo_v=$(libreoffice$lo_main_ver --version) fi current_lo_ver=$(echo "$current_lo_v" | sed 's/.*\([0-9]\.[0-9]\.[0-9]\.[0-9]\).*/\1/') #convert version numbers to integers for comparison lomv=$(echo "$lo_ver" | sed 's/.*\([0-9]\)\.\([0-9]\)\.\([0-9]\).*/\1\2\3/') locv=$(echo "$current_lo_ver" | sed 's/.*\([0-9]\)\.\([0-9]\)\.\([0-9]\)\.\([0-9]\).*/\1\2\3/') #download and install only if web version greater than current version #if main web version doesn't exist, then install new main version if [ $lomv -gt $locv ]; then echo "Current LibreOffice version $current_lo_ver, upgrading to version $lo_ver" cd ~/Downloads/ wget https://download.documentfoundation.org/libreoffice/stable/${lo_ver}/deb/x86_64/LibreOffice_${lo_ver}_Linux_x86-64_deb.tar.gz # en-GB Language Pack wget http://download.documentfoundation.org/libreoffice/stable/${lo_ver}/deb/x86_64/LibreOffice_${lo_ver}_Linux_x86-64_deb_langpack_en-GB.tar.gz tar -xvzf LibreOffice_${lo_ver}_Linux_x86-64_deb.tar.gz tar -xvzf LibreOffice_${lo_ver}_Linux_x86-64_deb_langpack_en-GB.tar.gz cd LibreOffice_*_Linux_x86-64_deb/DEBS dpkg -i *.deb cd ../../LibreOffice_*_Linux_x86-64_deb_langpack_en-GB/DEBS dpkg -i *.deb cd ../.. rm -rf LibreOffice_${lo_ver}* else echo "Current Version $current_lo_ver, available version $lo_ver" echo "No upgrade necessary" fi
config/libreoffice.1596889716.txt.gz · Last modified: 2023/05/29 11:53 (external edit)