Install and configure LibreOffice-4 Amazon Ec2 Instance (Amazon Linux)

  1. Login into Ec2 instance via SSH.
  2. Upgrade Amazon Linux.a) > sudo yum updateb) Reboot instance
  3. Login into Ec2 instance via SSH.
  4. Download LibreOffice (Select package depends on OS Architecture)> sudo wget LibreOffice
  5. Extract source from tar file.> sudo tar -xvzf LibreOffice_4.0.4_Linux_x86-64_rpm.tar.gz
  6. Enter into extracted directory then RPMS folder> cd LibreOffice_4.0.4.2_Linux_x86-64_rpm> cd RPMS
  7. Now need to install all rpms except one, you can remove that.> rm -rf libobasis4.0-gnome-integration-4.0.4.2-2.x86_64.rpm
  8. Now you can able to convert document.> /opt/libreoffice4.0/program/soffice.bin –headless –convert-to pdf test.rtf
  9. If you are getting any dependencies while document conversation please fulfill dependency.
  1. All packages almost available for all Linux flavors from two sources.

          – http://pkgs.org

          – http://rpm.pbone.net

11) In my case there was dependencies for dbus-glib-0 while document conversation.

> sudo wget http://mirror.centos.org/centos/6/updates/x86_64/Packages/dbus-glib-0.86-6.el6.x86_64.rpm

OR

> sudo rpm -Uvh http://mirror.centos.org/centos/6/updates/x86_64/Packages/dbus-glib-0.86-6.el6.x86_64.rpm

Able to perform document convent process headless after successful installation of LibreOffice.

Feel free to contact if anyone need help !

Advertisements

15 thoughts on “Install and configure LibreOffice-4 Amazon Ec2 Instance (Amazon Linux)

    • Parth Patel says:

      Thanks for quick reply. I got the libreoffice package and extracted it. But I don’t understand the conversion part. I am developing a PDF converter Android AWS Cloud App. I need to write a PHP or JAVA code at EC2 server that does the conversion from .doc to .pdf (for any file stored in EBS).

      I’ve tried to search for any tutorial regarding the matter. But no luck. Can you suggest me a way or any tutorial available? that will be great help.

    • Parth Patel says:

      HI,

      The one where you said “Now you are able to covert the document”. How to convert from DOC to PDF using libreoffice and Java/PHP code ?

      • dharmdip says:

        You are able to do headless conversation of documents with system command using JAVA/PHP

        > /opt/libreoffice4.X/program/soffice.bin –headless –convert-to pdf filename.doc

  1. Am getting the following error when I run soffice in headless mode. I have installed libreoffice4.4.3.2 and installed the dependency dbus-glib-0.86-6.el6.x86_64.rpm as well

    soffice.bin: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

  2. Hello. I’m getting an error like this: error while loading shared libraries:libdbus-glib-1.so.2
    I try to get that library from yum, but it’s said package already installed and latest version
    I’m using libreoffice 5.1
    Thanks.

  3. gugan says:

    Hi i tried installing libre office in the amazon linux, some how im not able to do. constantly getting missing dependency errors like :

    /opt/libreoffice5.2/program/oosplash: error while loading shared libraries: libuno_sal.so.3: cannot open shared object file: No such file or directory

    /opt/libreoffice5.2/program/soffice.bin: error while loading shared libraries: libmergedlo.so: cannot open shared object file: No such file or directory

    if you can help me out in doing this ! it would be great !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s