【问题标题】:Can I use the Module Compress::Raw::Zlib我可以使用模块 Compress::Raw::Zlib
【发布时间】:2015-10-04 18:27:17
【问题描述】:

团队,

我在我的 AIX 服务器上没有安装权限。我必须使用 Module Compress::Raw::Zlib 作为 Excel::Writer::XLSX 依赖项的一部分。

我已将模块包含在我的程序中,例如

BEGIN {
 push @INC,"/home/user/xx/Excel-Writer-XLSX-0.75/lib";
 push @INC,"/home/user/xx/Archive-Zip-1.34/lib";
 push @INC,"/home/user/xx/Compress-Raw-Zlib-2.063/lib";
}

运行程序时出现以下错误 在 @INC 中找不到模块 Compress::Raw::Zlib 的可加载对象

你能帮我解决这个问题吗?我需要安装这个模块吗?有没有其他方法可以实现使用 perl 创建 .xlsx 文件的功能。

问候 大卫

【问题讨论】:

  • 您可以尝试在本地安装它们,然后使用:use lib './library_location' 使包含这些库成为可能
  • 您好,nrathaus,感谢您的快速回复。
  • cpan 或 cpanm 出现内存不足错误。所以没有这样的选项可以安装在我的本地目录中。我没有以 root 身份输入的凭据

标签: perl


【解决方案1】:

push @INC,"/home/user/xx/Excel-Writer-XLSX-0.75/lib"; push @INC,"/home/user/xx/Archive-Zip-1.34/lib"; push @INC,"/home/user/xx/Compress-Raw-Zlib-2.063/lib";

仅适用于非 XS 模块。对于 XS 模块,您需要 blib/arch: push @INC,"/home/user/xx/Archive-Zip-1.34/blib/arch"; push @INC,"/home/user/xx/Archive-Zip-1.34/blib/lib"; push @INC,"/home/user/xx/Compress-Raw-Zlib-2.063/blib/arch"; push @INC,"/home/user/xx/Compress-Raw-Zlib-2.063/blib/lib";

但最好通过 local::lib 安装它们。手动安装 local::lib,而不是通过 cpan,然后通过 cpan 继续。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-07-15
    • 2019-08-09
    • 2022-01-24
    • 1970-01-01
    • 2011-04-23
    • 1970-01-01
    • 1970-01-01
    • 2012-04-27
    相关资源
    最近更新 更多