0

I am trying to get Java and Pi4j to work on my new Rasperry Pi 4 B.

I followed pi4j's instructions exactly. With jbang or maven I have same problem.

The pi4j-example-minimal ist compiled and packaged without errors. When I try to run it I get the error: [main] ERROR com.pi4j.library.gpiod.util.NativeLibraryLoader - unable to load [llibgpiod.so] using path [lib/aarch64/pi4j-gpiod/libgpiod.so]

There is actually no /lib/aarch64/ directory on the computer und nowhere I can find a file named libgpiod.so

I'm really disappointed that not even the Minimal-Example works. Can anyone help me and tell me, what is going wrong!

Thanks in advance! Andi

My system:

Raspberry Pi 4 Model B Rev. 1.5

Pi4j-basic-os on the sd-card (new from today, updated)

java version openjdk version 17.0.13 64 Bit Server

jbang version 0.119.0

I did the following:

git clone https://github.com/Pi4J/pi4j-jbang

Downloaded the pi4j-example-minimal from github

sudo which jbang Pi4JMinimalExample.java

Same problem when I did it with maven

5
  • Is that library installed? sudo dpkg --get-selections | grep libgpiod Commented Oct 29, 2024 at 11:50
  • Apparently not - no output. Commented Oct 29, 2024 at 17:02
  • 1
    Well it's not going to work without it. I suggest you look very carefully at the installation instructions Commented Oct 29, 2024 at 17:16
  • I'm working with Maven for the first time - I thought Maven takes care of all dependencies now ??? Commented Oct 29, 2024 at 21:04
  • Maven (usually) doesn't take care of native code. Only Java code Commented Oct 30, 2024 at 15:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.