How to use SIGAR with maven on Linux?
Asked Answered
O

1

7

I have am trying to run SIGAR on my linux project using maven for dependencies and the spring framework. In my Maven pom.xml file I have added the Maven dependency and the Maven repository, according to the official website.

However, this is still not enough. Now I have an error:

[DEBUG][Sigar]: no libsigar-amd64-linux.so in java.library.path
org.hyperic.sigar.SigarException: no libsigar-amd64-linux.so in java.library.path

I have searched the maven website and could not find the amd64-linux jar that I needed, nor do I know how to add it using Maven.

How do I fix the problem?

Oldtimer answered 19/2, 2014 at 21:44 Comment(4)
You have to install the library for your OS. The Java (.jar) pulled from the repo is just a binding to the system library.Hopefully
So, how can I do that using Maven?Oldtimer
You don't. You install it with your OS's package manager.Hopefully
How do I do that if I use Ubuntu? I tried using sudo apt-get install libsigar-amd64-linux.so but the package does not exist :SOldtimer
C
3

The answer to your other question should fix your problem: How to install SIGAR on Ubuntu-based Linux?

Its an issue with missing lib files from your projects "java.library.path" (The same folder that the Sigar ".jar" file is stored in), the lib files should normally be supplied with the sigar jar.

Cordelia answered 19/2, 2014 at 23:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.