Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install SIGAR on Ubuntu-based Linux?

I am using SIGAR in a java project with Maven and Spring. I have the Maven Dependency and Maven Repository included in my pom.xml file, as described in this link: http://mavenhub.com/mvn/thirdparty-uploads/org.hyperic/sigar/1.6.5.132

Furthermore, I am launching the program using Jetty (which launches the .war file created by mvn install).

However, SIGAR still won't work. Aparently I also need to install libsigar-amd64-linux-1.6.4.

So I downloaded that file, but now I have no idea what to do with it. How do I fix this? Where do I put that file?

like image 791
Flame_Phoenix Avatar asked Feb 19 '14 22:02

Flame_Phoenix


2 Answers

Finally found the solution. I had to download SIGAR from the official source.

Then I had to copy/paste the entire "lib" folder (with all the .so and .dll and whatnot) into the folder "main/src/webapp" of the project, which is used by Spring to store needed apps (or so I assume).

Then after running mvn install, checking the "target" folder and running the newly generated .war file, everything runs as expected.

like image 79
Flame_Phoenix Avatar answered Sep 28 '22 08:09

Flame_Phoenix


I believe it needs to be put into your programs library folder, alongside the "sigar.jar" file.

If you plan to run your program on other OS variants, you should also have a bunch of ".dll", ".so" and ".dylib" files in the same lib folder.

Edit: You can download sigar at the link below, it contains the lib files for all major platforms: http://sourceforge.net/projects/sigar/?source=navbar

like image 22
sorifiend Avatar answered Sep 28 '22 07:09

sorifiend