问题描述 :
-->执行指令 ./lcov/bin/lcov --directory ./ --capture --output-file cov.info
系统报错1: Can't locate Capture/Tiny.pm in @INC (you may need to install the Capture::Tiny module) (@INC contains: /mnt/data/azp/tmp_folder/gtest/lcov/bin/../lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /mnt/data/azp/tmp_folder/gtest/lcov/bin/../lib/lcovutil.pm line 13.
系统报错2: Can't locate DateTime.pm in @INC (you may need to install the DateTime module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./lcov/bin/genhtml line 87.
BEGIN failed--compilation aborted at ./lcov/bin/genhtml line 87.
系统报错3: Can't locate namespace/autoclean.pm in @INC (you may need to install the namespace::autoclean module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/DateTime.pm line 9.
问题解决:
系统报错1:通过安装Capture::Tiny module
系统报错2:通过安装DateTime module
系统报错3:通过安装 namespace::autoclean module
解决方法:
系统报错1:
https://metacpan.org/pod 登陆该网站
搜索Capture::Tiny,找到库之后可通过左侧Tools模块 Download下载
解压下载好的Capture-Tiny-0.48.tar.gz
指令为: tar -zxvf Capture-Tiny-0.48.tar.gz
执行以下命令
cd Capture-Tiny-0.48/
perl Makefile.PL
make
sudo make install
系统报错2:
https://metacpan.org/pod 登陆该网站
搜索DateTime,找到库之后可通过左侧Tools模块 Download下载
解压下载好的DateTime-1.59.tar.gz
指令为: tar -zxvf DateTime-1.59.tar.gz
执行以下命令
cd DateTime-1.59/
perl Makefile.PL
make
sudo make install
系统报错3:
https://metacpan.org/pod 登陆该网站
搜索DateTime,找到库之后可通过左侧Tools模块 Download下载
解压下载好的namespace-autoclean-0.29.tar.gz
指令为: tar -zxvf namespace-autoclean-0.29.tar.gz
执行以下命令
cd namespace-autoclean-0.29 /
perl Makefile.PL
make
sudo make install
执行完之后,该问题可被解决