accumu/megaraid-scripts

How to execute this script on Debian its show following error

fti-sfuke opened this issue · 1 comments

root@DEB-ESC4000E:~/samadhan/megaraid-scripts# ls
LICENSE  megaraid-checkup  README.md
root@DEB-ESC4000E:~/samadhan/megaraid-scripts# perl -v

This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu-thread-multi
(with 65 registered patches, see perl -V for more detail)

Copyright 1987-2018, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
root@DEB-ESC4000E-:~/samadhan/megaraid-scripts# perl ./megaraid-checkup 
Can't locate JSON.pm in @INC (you may need to install the JSON module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./megaraid-checkup line 26.
BEGIN failed--compilation aborted at ./megaraid-checkup line 26.

root@DEB-ESC4000E:~/samadhan/megaraid-scripts# perl megaraid-checkup
Can't locate JSON.pm in @INC (you may need to install the JSON module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at megaraid-checkup line 26.
BEGIN failed--compilation aborted at megaraid-checkup line 26.
root@DEB-ESC4000E-:~/samadhan/megaraid-scripts#

Install the module(s) required, the error hints this with you may need to install the JSON module.

How to do this is distribution-specific, on Debian I think you'll need the libjson-perl package.

I'll update the README with a requirements section.