Skip to content

Instantly share code, notes, and snippets.

@fxkraus
Last active November 21, 2024 01:29
Show Gist options
  • Save fxkraus/595ab82e07cd6f8e057d31bc0bc5e779 to your computer and use it in GitHub Desktop.
Save fxkraus/595ab82e07cd6f8e057d31bc0bc5e779 to your computer and use it in GitHub Desktop.
Install LSI MegaCli .deb package on Debian/Ubuntu

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip

unzip 8-07-14_MegaCLI.zip

create debian package

cd Linux
sudo alien MegaCli-8.07.14-1.noarch.rpm

install debian package

sudo dpkg -imegacli_8.07.14-2_all.deb

run MegaCli

/opt/MegaRAID/MegaCli/MegaCli64 -h
@jiangsanyin
Copy link

Repo Source for megaRaid and other different Raid Controller
see: https://hwraid.le-vert.net/wiki/DebianPackages

for debian distributions

DIST=$(lsb_release -c | grep "Codename:" | awk '{print $2}')  # jessie wheezy or stratch  whatelse
wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -
echo " deb http://hwraid.le-vert.net/debian $DIST main " > /etc/apt/sources.list.d/raidtoolRepo.list
apt-get update
apt-get install megactl megacli megamgr

it works on x86_64 ubuntu,but not arm64 ubuntu.any idea?

@AysadKozanoglu
Copy link

AysadKozanoglu commented Aug 30, 2021

Repo Source for megaRaid and other different Raid Controller
see: https://hwraid.le-vert.net/wiki/DebianPackages
for debian distributions

DIST=$(lsb_release -c | grep "Codename:" | awk '{print $2}')  # jessie wheezy or stratch  whatelse
wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -
echo " deb http://hwraid.le-vert.net/debian $DIST main " > /etc/apt/sources.list.d/raidtoolRepo.list
apt-get update
apt-get install megactl megacli megamgr

it works on x86_64 ubuntu,but not arm64 ubuntu.any idea?

The repo is only for x86_amd64 binary packages.

For arm64 you have to compile from source Code by yourself for megacli or storecli. You can get the source code from github and compile the source code on your arm64 environment.

Maybe you can find preCompiled binaries for arm64 from other users

@jiangsanyin
Copy link

Repo Source for megaRaid and other different Raid Controller
see: https://hwraid.le-vert.net/wiki/DebianPackages
for debian distributions

DIST=$(lsb_release -c | grep "Codename:" | awk '{print $2}')  # jessie wheezy or stratch  whatelse
wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -
echo " deb http://hwraid.le-vert.net/debian $DIST main " > /etc/apt/sources.list.d/raidtoolRepo.list
apt-get update
apt-get install megactl megacli megamgr

it works on x86_64 ubuntu,but not arm64 ubuntu.any idea?

The repo is only for x86_amd64 binary packages.

For arm64 you have to compile from source Code by yourself for megacli or storecli. You can get the source code from github and compile the source code on your arm64 environment.

Maybe you can find preCompiled binaries for arm64 from other users

Thanks to your reply.
Yes,i noticed this point( get the source code from github and compile the source code on my arm64 environment) when post my question yestoday,but i don't find the source code in github.Do you know where it is?

@andyjbm
Copy link

andyjbm commented Jan 30, 2022

Hi @kaizimmer1,

Appreciate this is a year on and you've probably way done with this now but I came up against the same thing.

So for others like me that might stumble upon this thread...

Your card is not a megaraid card so megacli won't see it:
3b:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS (rev 08)

It's a Fusion-MPT SAS. You need lsiutils which works for me.
Or sas2ircu which is of limited use tbh.

Regards,

Andy.

@matveynator
Copy link

new megaraid:

curl -L "https://github.com/matveynator/sysadminscripts/raw/main/debian/megacli_8.07.14-2_all.deb" > /tmp/megacli_8.07.14-2_all.deb; dpkg -i /tmp/megacli_8.07.14-2_all.deb;

new arcconf:

curl -L "https://github.com/matveynator/sysadminscripts/raw/main/debian/arcconf_3.07-23972_amd64.deb" > /tmp/arcconf_3.07-23972_amd64.deb; dpkg -i /tmp/arcconf_3.07-23972_amd64.deb;

@iammeken
Copy link

wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -

wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key |gpg --dearmor -o /etc/apt/trusted.gpg/hwraid.le-vert.net.gpg

For Ubuntu 22.04 x64:
curl -fsSL https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/hwraid.le-vert.net.gpg

@Napsty
Copy link

Napsty commented Jan 9, 2024

For Ubuntu (as of writing this, for precise, trusty, xenial, focal, bionic):

DIST=$(lsb_release -c | grep "Codename:" | awk '{print $2}')
wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add - # Old APT Key method
curl -fsSL https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/hwraid.le-vert.net.gpg # New APT Key method
echo "deb http://hwraid.le-vert.net/ubuntu $DIST main " > /etc/apt/sources.list.d/hwraid.list
apt-get update
apt-get install megacli

@0n1cOn3
Copy link

0n1cOn3 commented Feb 7, 2024

@fxkraus

Theres a small typo :-)

sudo dpkg -imegacli_8.07.14-2_all.deb

instead it should be

sudo dpkg -i megacli_8.07.14-2_all.deb

@jesussuarz
Copy link

jesussuarz commented Apr 30, 2024

I made the following guide for greater reference and ease.

https://gist.github.com/jesussuarz/78a00eaa5925a444fb12b31646e773e1

@freemanlutsk
Copy link

no megacli for debian on 64 bit system?

MegaCli: error while loading shared libraries: libncurses.so.5: cannot open shared object file
Then you're probably on a 64-bit (or mixed) system and want to use MegaCli64 instead (or install lib32ncurses5(verify))

can't find MegaCli64 . smh

I fixed this issue on Ubuntu 24.04, just by creating the symlink for:
ln -s /usr/lib/x86_64-linux-gnu/libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5
Now works good!

/opt/MegaRAID/MegaCli/MegaCli64 -v


      MegaCLI SAS RAID Management Tool  Ver 8.07.14 Dec 16, 2013

    (c)Copyright 2013, LSI Corporation, All Rights Reserved.
Exit Code: 0x00

@gwijayas
Copy link

gwijayas commented May 28, 2024

no megacli for debian on 64 bit system?

MegaCli: error while loading shared libraries: libncurses.so.5: cannot open shared object file
Then you're probably on a 64-bit (or mixed) system and want to use MegaCli64 instead (or install lib32ncurses5(verify))

can't find MegaCli64 . smh

I fixed this issue on Ubuntu 24.04, just by creating the symlink for: ln -s /usr/lib/x86_64-linux-gnu/libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 Now works good!

/opt/MegaRAID/MegaCli/MegaCli64 -v


      MegaCLI SAS RAID Management Tool  Ver 8.07.14 Dec 16, 2013

    (c)Copyright 2013, LSI Corporation, All Rights Reserved.
Exit Code: 0x00

Still need libtinfo.so.5:

/opt/MegaRAID/MegaCli/MegaCli64: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

So... maybe, with copy/linking from /lib/x86_64-linux-gnu/libtinfo.so.6 to libtinfo.so.5 will solved the problem too

@xavghub
Copy link

xavghub commented Jun 23, 2024

Works well on Proxmox (based on Debian):

  1. Install necessary tools
    apt-get install unzip
    apt-get install alien
  2. Install necessary lib
    apt install libncurses5
  3. Download
    wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
  4. Unzip
    unzip 8-07-14_MegaCLI.zip
  5. Create debian package
    cd Linux
    sudo alien MegaCli-8.07.14-1.noarch.rpm
  6. Install debian package
    sudo dpkg -i megacli_8.07.14-2_all.deb
  7. run MegaCli
    `/opt/MegaRAID/MegaCli/MegaCli64 -h

yup that worked for me on Proxmox
Thanks alot !

@nyaky2
Copy link

nyaky2 commented Jun 26, 2024

Hi I'm wondering if someone can help me out

Followed all of the steps, but get

./libstorelibir-2.so: cannot open shared object file: No such file or directory

 Internal Error.
ERROR:Could not detect controller.
Failed to get ControllerId List.
Failed to get CpController object.

I'm also using proxmox. Tnx

@jesussuarz
Copy link

Hi I'm wondering if someone can help me out

Followed all of the steps, but get

./libstorelibir-2.so: cannot open shared object file: No such file or directory

 Internal Error.
ERROR:Could not detect controller.
Failed to get ControllerId List.
Failed to get CpController object.

I'm also using proxmox. Tnx

Follow the following steps and tell me if they work for you:

apt install apt-file
apt-file update
apt-file search libstorelibir-2.so

If you find the library, create a symbolic link:

ln -s /path/libstorelibir-2.so ./libstorelibir-2.so

or you can also try to install just the library.

apt install libstorelibir-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment