OpenResty中遇到"Can't locate Time/HiRes.pm in @INC"问题的解决方法

来源:互联网 时间:2017-12-28

今天在研究resty这个命令行工具时,执行

resty -h

出现下面的报错


Can't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/openresty/bin/resty line 20.
BEGIN failed--compilation aborted at /opt/openresty/bin/resty line 20.
打开脚本出错位置,看到


解决方法:

yum -y install perl-Time-HiRes



再次执行

resty -h

就一切正常了



相关阅读:
Top