How to install SIGAR on Ubuntu-based Linux?

11,492

Solution 1

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.

Solution 2

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

Solution 3

To install sigar on Linux, here is a copy/paste option:

wget https://netcologne.dl.sourceforge.net/project/sigar/sigar/1.6/hyperic-sigar-1.6.4.tar.gz
tar xvf hyperic-sigar-1.6.4.tar.gz
cd hyperic-sigar-1.6.4

# INSTALL
sudo cp sigar-bin/lib/libsigar-`dpkg --print-architecture`-`uname -s | tr '[:upper]' '[:lower]'`.so /usr/lib

Solution 4

@aitorhh This actually works, **But had some errors in your code, this works:

wget https://netcologne.dl.sourceforge.net/project/sigar/sigar/1.6/hyperic-sigar-1.6.4.tar.gz
tar xvf hyperic-sigar-1.6.4.tar.gz
cd hyperic-sigar-1.6.4

# INSTALL
sudo cp sigar-bin/lib/libsigar-`dpkg --print-architecture`-`uname -s | tr '[:upper:]' '[:lower:]'`.so /usr/lib

Solution 5

just install sigar lib:

sudo apt install libhyperic-sigar-java

this works for me.

Share:
11,492
Flame_Phoenix
Author by

Flame_Phoenix

I have been programming all my life since I was a little boy. It all started with Warcraft 3 and the JASS and vJASS languages that oriented me into the path of the programmer. After having that experience I decided that was what I wanted to do for a living, so I entered University (FCT UNL ftw!) where my skills grew immensely and today, after several years of studying, professional experience and a master's degree, I have meddled with pretty much every language you can think of: from NASM to Java, passing by C# Ruby, Python, and so many others I don't even have enough space to mention them all! But don't let that make you think I am a pro. If there is one thing I learned, is that there is always the new guy can teach me. What will you teach me?

Updated on June 25, 2022

Comments

  • Flame_Phoenix
    Flame_Phoenix almost 2 years

    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?