The "open" command in RStudio terminal gives an error

Hi,
I am used to open pdf cheatsheets directly from the RStudio terminal with the command open.
I recently upgraded Ubuntu 22.04 to Ubuntu 24.04 and after this, the open command gives this error:

/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

However, opening the pdf file with the command open works fine when using the terminal of Ubuntu.
Is there something I can do to solve this problem?
Thanks

What file permissions are set for /usr/lib/libreoffice/program/libreglo.so?

Thanks for your response. the file was set to only reading. I set it to read-write but the problem persists. What is intriguing is that the default application for opening pdf files is the document viewer of Ubuntu (evince), not libreoffice.

I wondered about the involvement of libreoffice. It might be used if a PDF were being opened for editing as opposed for reading. What is the exact command (including all arguments) that produces the error messages?

Here is:

open ../bibliografia\ para\ R/CHEATSHEETS/stringr.pdf

the path takes into account that I'm in the pwd of the R project. stringr.pdf is just an example, it happens with every file, even with LibreOffice documents.
This only happens with the terminal in RStudio. Using the open command from the OS terminal won't give any error. I don't use any arguments.
Thanks

It's a bit of a long-shot, but does surrounding the file path with quotes make a difference in the RStudio terminal?

I'm running Ubuntu 22.04 and RStudio 2024.07.0+330. I get nothing. No error and no pdf. I assume it's an RStudio change but who knows?

PS. : Paul's idea seems to generate an error.

Thanks for your response.
Actually, if I go to the folder where the cheat-sheets are and run the open command I get the same error

cd . ./bibliografia\ para\ R/CHEATSHEETS/
open stringr.pdf

There is a .profile file in the home directory. I created an alias in this file to open the stringr.pdf . It did not give the error, but instead of opening the stringr.pdf file, it opens the file browser positioned in the cheatsheet folder.
I couldnĀ“t upload the .profile file but here is the content:

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
	. "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

alias stringr='open ../bibliografia\ para\ R/CHEATSHEETS/'

I am just an RStudio-R end-user, so I get mixed up with the configuration files and paths. I don't quite understand the meaning of each line, but I might think that here is the problem. There is another configuration file in the home directory named .bashrc, this is the file where I normally put the aliases for opening the cheatsheets. Unfortunately, if I remove the .profile file and source the .bashrc, when invoking the alias I get the same error :disappointed: