我想构建一个mysql mha测试集群。 mha经理是由Perl编写的。我必须安装一些perl模块,如perl-devel来运行管理器。并编译管理器的源代码。
问题是所有perl模块都安装在路径" / root / perl5 /"下,我希望以用户" mha"运行管理器。但用户" mha"没有权限访问perl模块目录,无法找到一些必要的模块。喜欢:
sudo -u mha perl Makefile.PL
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
Can't locate Scalar/Util.pm in @INC (@INC contains: /home/mha/mha4mysql-manager/inc /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 /home/mha/mha4mysql-manager) at /usr/share/perl5/Safe.pm line 4.
BEGIN failed--compilation aborted at /usr/share/perl5/Safe.pm line 4.
Compilation failed in require at /usr/share/perl5/CPAN.pm line 56.
BEGIN failed--compilation aborted at /usr/share/perl5/CPAN.pm line 56.
Compilation failed in require at inc/Module/AutoInstall.pm line 277.
我对perl一无所知。有人告诉我如何解决它?