Failed to load native library 'libnative-platform.so' for Linux amd64

For Ubuntu

I have installed Gradle 7.2 and the repository directory in /opt/gradle/ to be shared for some users:

Therefore:

/opt/gradle/
      7.2        rwxr-xr-x root root
      repository rwxr-xr-x root root

Where each directory has rwxr-xr-x root root, when I execute gradle --version appears

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not initialize native services.
   > Failed to load native library 'libnative-platform.so' for Linux amd64.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

I have already read:

Therefore if I use: gradle --version -g ~/.gradle it works fine - therefore it is an access permission problem/situation for each non-root user/group, but even when I created a common group (developer) for the users and added +w to the common group for both - I mean

/opt/gradle/
      7.2        rwxrwxr-x root developer
      repository rwxrwxr-x root developer

appears the same error - the goal is share among the users the same repository access.

What is missing to accomplish this goal?

1 Like

Hello,

did you find a solution?