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

4 REPLIES 4

Yeshwanth
Honored Contributor
Honored Contributor

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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!