In the previous post
CentOS 6 - Install LibreOffice as a service I installed libre office by using yum repositories. But if your client machine does not have access to the yum repository wich contains these packages, you have a problem.
In my local installation, I used my CentOS-Base.repo yum repo (check appendix I). This is the repo in /etc/yum.repos.d/CentOS-Base.repo file:
(...)
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
(...)
This mirror is resolved as
http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock (check appendix II)
So, you can add this repo to the client machine or you can prepare a "bundle" which contains all packages needed to your installation. I tried this second one.
In my local machine I used yum downloadonly plugin in order to download the libreoffice packages and all their dependencies, and save them in a directory.
yum install yum-plugin-downloadonly
yum install --downloadonly --downloaddir=/tmp/libreoffice libreoffice-headless
yum install --downloadonly --downloaddir=/tmp/libreoffice libreoffice-writer
cd /tmp
tar -zcvf libreoffice-4.3.7.gz libreoffice
Once you have all the RPM files, you only need to put them in the client machine and make a local install.
tar -xvf libreoffice-4.3.7.gz
cd libreoffice
yum localinstall *.rpm
Appendix I - How to know which repo a package came from
I you have a package installed and you want to know where it came from, you can use
repoquery. This is a utility of
yum-utils:
yum install yum-utils
repoquery -i libreoffice-writer
Appendix II - How to resolve yum properties
Yum properties like "releasever", "basearch" and "infra" can be resolved by using a
python script:
/usr/bin/python -c 'import yum;yb=yum.YumBase();yb.doConfigSetup(init_plugins=False);print yb.conf.yumvar["rleaseserver"]'
/usr/bin/python -c 'import yum;yb=yum.YumBase();yb.doConfigSetup(init_plugins=False);print yb.conf.yumvar["basearch "]'
/usr/bin/python -c 'import yum;yb=yum.YumBase();yb.doConfigSetup(init_plugins=False);print yb.conf.yumvar["infra"]'
Apendix III - Why I did not install the latest version of libreoffice
My Unix skills are quite meager. I tried to download and install the latest stable libreoffice RPMs by downloading them from the official site:
https://es.libreoffice.org/descarga/libreoffice-estable/?type=rpm-x86_64&version=5.2 , but after the installation I got a lot of errors like:
/opt/libreoffice5.1/program/oosplash: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Each time I installed the missing library, another one missing library appeared. I think this is due to the fact that I was using a CentOS server installation, without Gnome or KDE...