docx files fail to open in RStudio on Debian (at least 11) – Java rstudio

System details

RStudio Edition : Dektop
RStudio Version : 1.4.1717 and 2021.09.0+350
OS Version      : Debian 11
R Version       : 4.0.4

Steps to reproduce the problem

  1. Knit an R Markdown file to Word format.
    • The file should be created.
    • However, it’s not automatically opened.
  2. Click on the file in the Files pane
  3. Open the file in the system, outside of RStudio
    • The file should open in LibreOffice (assuming it’s installed, which should be the case by default).

Describe the problem in detail

The Word .docx file doesn’t open in RStudio. The following is emitted in the console output:

/usr/lib/libreoffice/program/javaldx: error while loading shared libraries: libreglo.so: cannot open shared object file: No such file or directory
Warning: failed to read path from javaldx
/usr/lib/libreoffice/program/soffice.bin: error while loading shared libraries: libreglo.so: cannot open shared object file: No such file or directory

Describe the behavior you expected

The file should open successfully in LibreOffice (or whatever it’s associated with), without errors.

Note: I haven’t tried this recently on Debian 10.

I haven’t tried this on Debian

  • [ ] I have read the guide for submitting good bug reports.
  • [ ] I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • [ ] If I am reporting an RStudio crash, I have included a diagnostics report.
  • [ ] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
Asked Sep 20 ’21 at 14:24

avatar of ronblum

ronblum

2 Answers:

@ronblum does it work in libreoffice outside of RStudio?
Also, check the LDLIBRARYPATH from within the session

Answered Sep 20 ’21 at 17:29

avatar of mikebessuille

mikebessuille

  1. Aha—if I add /usr/lib/libreoffice/program/ to LD_LIBRARY_PATH, it works.
  2. It opens with LibreOffice.
  3. Bonus: The issue is in Debian 10, as well.

So it’s just the LDLIBRARYPATH. I’ll close this.

Answered Sep 20 ’21 at 18:07

avatar of ronblum

ronblum

Read more here: Source link