install extension issues

/usr/lib64/libreoffice/program# unopkg add --shared test19.oxt

ERROR: You need write permissions to install a shared extension!

There was an error when I used the command to load my own extension. Does anyone know why?
Where are the plugins installed?

Why don’t you install to the user space?

I want to automated installation it in my script.
user space?

You attempted to add a shared (available to all users) extension, which would be added to (probably) /usr/lib64/libreoffice/share/extensions for which of course you need to be either root or sudo user.

You can add extensions for your own user using menu Tools → Extension Manager…

Thank you for your answer.
I used root user to try, same error.
Because I want to automated installation it in my script, I cannot use the EXtension Manager.

For me it worked like this on Linux Mint:

Adding an extension for single user:

$ /usr/lib/libreoffice/program/unopkg add -s -f FULL_PATH_YOUR_EXTENTION/extension.oxt

Adding an extension for all users: [need Super User permission to add or remove]

$ sudo /usr/lib/libreoffice/program/unopkg add --shared -s -f FULL_PATH_YOUR_EXTENTION/extension.oxt

====================

see more:
https://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/unopkg

or:

/usr/lib/libreoffice/program/unopkg -h