How do I install the LSI megacli in Ubuntu?

Its returning empty because you are running the executable without the libraries.

To install it correctly go the the LSI download site and search for megacli.

Download the latest version (release 8.07):

enter image description here

Extract it via a gui or with the command unzip MegaCli_Linux.zip.

Install the extracted .deb file with dpkg -i megacli_8.07.08-1_all.deb or just double click the deb file if you are running a desktop.

enter image description here


Follow these steps:

  • download MegaCLI package for Ubuntu:

    wget http://hwraid.le-vert.net/debian/pool-stretch/megacli/megacli_8.07.14-2%2BDebian.stretch.9.9_amd64.deb
    
  • install MegaCLI in your system:

    dpkg -i megacli_8.07.14-2%2BDebian.stretch.9.9_amd64.deb
    
  • update your repositories:

    apt-get update
    
  • check info about your RAID controller:

    megacli -LDInfo -LAll -aAll
    

storcli64, referenced in this serverfault answer worked for me:

$ sudo storcli64 /c0/d0 show
Controller = 0
Status = Success
Description = Show Diskgroup Succeeded

TOPOLOGY :
========
-------------------------------------------------------------------------
DG Arr Row EID:Slot DID Type  State BT      Size PDC  PI SED DS3  FSpace 
-------------------------------------------------------------------------
 0 -   -   -        -   RAID5 Optl  N  10.913 TB enbl N  N   none N      
 0 0   -   -        -   RAID5 Optl  N  10.913 TB enbl N  N   none N      
 0 0   0   252:0    3   DRIVE Onln  N   3.638 TB enbl N  N   none -      
 0 0   1   252:1    2   DRIVE Onln  N   3.638 TB enbl N  N   none -      
 0 0   2   252:2    1   DRIVE Onln  N   3.638 TB enbl N  N   none -      
 0 0   3   252:3    0   DRIVE Onln  N   3.638 TB enbl N  N   none -      
-------------------------------------------------------------------------

Here's the documentation and download page: StorCLI.