cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Installing LibreOffice on Databricks

semsim
Contributor

Hi,

 

I need to install libreoffice to do a document conversion from .docx to .pdf. The requirement is no use of containers. Any idea on how I should go about this? 

Environment: Databricks 13.3 LTS

Thanks,

Sem

1 ACCEPTED SOLUTION

Accepted Solutions

Hey @Yeshwanth ,

Finally got it installed. Here is what worked for me:

%sh 
sudo apt update && sudo apt upgrade -y

%sh
sudo apt install libreoffice-common libreoffice-java-common libreoffice-writer openjdk-8-jre-headless -y

Thanks,

Sem

View solution in original post

5 REPLIES 5

Yeshwanth
Databricks Employee
Databricks Employee

Hi @semsim Good day!

I just wanted to check if you have tried the following commands already.

%sh 
sudo apt-get install -y libreoffice
sudo apt-get install -y unoconv

 

Hi Yeshwanth,

Where would I run these commands? I tried running it in a notebook but it didn't solve the problem.

Thanks,

Sem

Hi @Yeshwanth ,

I've ran these commands and others at the notebook level. I have also ran the commands as an init script. Neither has worked so far. 

Here is what I am seeing when I run the commands:

semsim_0-1717778077489.png

and here is the error message I receive when I try to run the function that needs libreoffice:

semsim_1-1717778122286.png

 

Hey @Yeshwanth ,

Finally got it installed. Here is what worked for me:

%sh 
sudo apt update && sudo apt upgrade -y

%sh
sudo apt install libreoffice-common libreoffice-java-common libreoffice-writer openjdk-8-jre-headless -y

Thanks,

Sem

furkan
New Contributor II

Hi @semsim 

I'm attempting to install LibreOffice for converting DOCX files to PDF and tried running your shell commands from notebook. However, I encountered the 404 errors shown below. Do you have any suggestions on how to resolve this issue? I really appreciate any help.

Screenshot 2024-08-22 at 14.37.54.png

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group