错误1:安装perl-DBD-MySQL的过程中遇到了一个报错,提示缺少libmysqlclient.so.18,缺少一个MySQL依赖的组件。
Error: Package: perl-DBD-MySQL-4.023-6.el7.x86_64 (base)
Requires: libmysqlclient.so.18()(64bit)
Error: Package: perl-DBD-MySQL-4.023-6.el7.x86_64 (base)
Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
解决:
wget https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql-community-libs-compat-5.7.31-1.el7.x86_64.rpm && rpm -ivh mysql-community-libs-compat-5.7.31-1.el7.x86_64.rpm
yum install perl-DBD-MySQL -y
错误2:安装manager时执行perl Makefile.PL时,出现
Warning: prerequisite Parallel::ForkManager 0 not found.
原因是cpanm模块未安装
wget https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm
cp /root/cpanm /usr/bin/cpanm
chmod +x /usr/bin/cpanm
cpanm Parallel::ForkManager #下载缺失的模块
之后进行编译安装就可成功执行
[root@manager mha4mysql-node-0.57]# perl Makefile.PL
*** Module::AutoInstall version 1.06
*** Checking for Perl dependencies...
[Core Features]
- DBI ...loaded. (1.627)
- DBD::mysql ...loaded. (4.023)
*** Module::AutoInstall configuration finished.
Writing Makefile for mha4mysql::node
Writing MYMETA.yml and MYMETA.json