How to use SIGAR with maven on Linux?

Flame_Phoenix picture Flame_Phoenix · Feb 19, 2014 · Viewed 8.5k times · Source

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?

Answer

sorifiend picture sorifiend · Feb 20, 2014

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.