Hi there,
change to root using su and then use the same command without prefixing it with sudo.
Otherwise you would need to configure sudo:
https://wiki.mageia.org/en/Configuring_sudoApart from that, why would you want to install the newest version? Because if you already having issues installing it, updating it regularly might cause even more issues ...
I'd say if you really want the newest version, better install it as flatpak:
https://flathub.org/apps/details/org.li ... ibreOfficeAs that way you also get updates via flatpak.