【发布时间】:2021-08-01 07:29:18
【问题描述】:
我一直在用pp
不久前!
但是,当我租用另一个主机时,当我运行 pp 命令时,脚本不会在服务器上运行
CentOS Linux 版本 7.9.2009(核心) Perl v 5.32.1
命令使用 pp,主机旧
$ pp -x -c name.pl
运行时
./a.out
Unable to open html entities file (/tmp/par-726f6f74/cache-78cdefedff4d2afddea0035addc3b570c8f0bfd5/inc/lib/Mojo/resources/html_entities.txt): No such file or directory at script / name.pl line 13.
Compilation failed in require at script / name.pl line 13.
BEGIN failed - compilation aborted at script / name.pl line 13.
当我运行./name.pl 时,它运行正常。
有什么建议吗?
名称.pl
#!/usr/bin/perl
use FindBin qw($Bin);
use lib ("$Bin");
use DBI;
use Number::Format;
use Encode qw(decode encode);
use File::Basename;
use Mojo::Util qw(b64_encode b64_decode url_escape url_unescape);
use Mojo::JSON qw(decode_json encode_json);
use Image::ExifTool;
use LWP;
print "Test Mojo";
同样的命令在另一个服务器/主机上的 5.28 版本中正常工作
【问题讨论】:
-
use lib ("$Bin")是什么意思?您是否在本地安装了模块? -
我可以在 Ubuntu 21.04、perl 版本 5.32 上重现此错误,here 是产生错误的最小版本
-
模块是使用 ROOT 安装的 sudo cpan Mojo 我刚刚创建了文件夹:./Mojo/resources/ 包含文件:html_entities.txt
-
已添加bug report
标签: perl mojo perl-packager