How to Solve “Error: source file could not be loaded“ [Ubuntu Use LibreOffice]

#Accident scene

Use libreoffice under Ubuntu to convert txt to PDF. The command is as follows:

libreoffice  --invisible --convert-to pdf   /home/parasaga/resource/testtxt.txt --outdir /home/parasaga/resource/

report errors:

Error: source file could not be loaded

#Causes and Solutions

1. Reason:

To install libreoffice, use the following command:

sudo apt-get install libreoffice-common

In this way, the libreoffice writer module will not be installed, resulting in the above error;

2. Solution:

Install the libreoffice writer module.

sudo apt-get install libreoffice-writer

Read More: