【问题标题】:Error install Inline::Perl5 with Zef (Raku)使用 Zef (Raku) 安装 Inline::Perl5 时出错
【发布时间】:2023-02-03 14:55:40
【问题描述】:

我正在尝试在 Debian 11 x64 上安装 Raku。我以前从未安装过它(也是 perl5)

这是一个带有一些 Perl5 脚本的服务器,我想在 Raku 中使用 Inline::Perl5 “使用”它(如果我在 Raku 模块中找不到我想要的东西,我也想使用 Perl5 模块)但我不能.

perl5 是通过 APT 安装的,rakudo 也是。

运行zef install Inline::Perl5 时,我得到以下信息:

===> Searching for: Inline::Perl5
===> Searching for missing dependencies: Distribution::Builder::MakeFromJSON:ver<0.6+>
===> Searching for missing dependencies: System::Query
===> Failed to find dependencies: System::Query Failed to resolve some missing dependencies

如果我尝试用zef安装System::Query,我得到:

===> Searching for: System::Query
No candidates found matching identity: System::Query

你有什么想法可以帮助我吗?

多谢

【问题讨论】:

  • 这些“未找到”错误的通常来源是使用旧版本的zef。你升级到最新的了吗?

标签: raku rakudo zef


【解决方案1】:

您安装的 rakudo 版本可能没有内置那个版本。您可以通过 zef upgrade zef 升级 zef。我的 zef 版本 0.14.5 能够毫无故障地找到 System::Query

> zef search System::Query
===> Updating fez mirror: https://360.zef.pm/
===> Updated fez mirror: https://360.zef.pm/
===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Found 8 results
---------------------------------------------------------------------------------------------------------------------------------------------------------------
ID|From                            |Package                                     |Description                                                                   
---------------------------------------------------------------------------------------------------------------------------------------------------------------
0 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.6>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
1 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.5>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
2 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.4>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
3 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.6>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
4 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.5>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
5 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.4>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
6 |Zef::Repository::LocalCache     |System::Query:ver<0.1.6>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
7 |Zef::Repository::LocalCache     |System::Query:ver<0.1.4>:auth<github:tony-o>|A utility for collapsing JSON dependent upon certain environmental information
---------------------------------------------------------------------------------------------------------------------------------------------------------------

【讨论】:

  • 你好,谢谢你的回复。已尝试升级 ZEF,但已经是最新版本:>所有请求的发行版都已经是最新版本
  • @JeremieCORBION 你后来做了zef update吗?
  • 是的,不是更好...如果我执行“zef search System::Query”返回 0 个结果
  • @JeremieCORBION 你能用 -v 运行它并显示整个输出吗?它是否正确更新索引?
  • @jjimerelo 不确定你想要什么..如果运行zef search System::Query -v获取===&gt; Found 0 results如果我这样做zef update -v获取`-------------------- ------------------------------ 内容存储|分发计数------------ ---------------------------------- Zef::Repository::LocalCache |4 Zef:: Repository::Ecosystems<p6c> |707 Zef::Repository::Ecosystems<cpan>|1909 ---------------------------- ----------------------`
【解决方案2】:

我偶尔会像这样使用 apt-get:

`sudo apt-get install rakudo -y`;
`sudo git clone https://github.com/ugexe/zef.git`;
`sudo raku -I./zef zef/bin/zef install ./zef --/test`;

它很方便并且可以工作到一定程度 - 但是(正如刚才检查的那样)它不能为 Inline::Perl5 完成工作。众所周知,在 raku 社区中,apt-get 构建管道的最后一次拾取恰逢 zef 进入核心的一半完成移动 - 所以,正如您所看到的,您现在需要手动安装 zef(只有当您使用 apt-获取路线)。

Inline::Perl5 失败的原因在 Inline::Perl5 README.md 文档中列出是:

如果您使用 Linux 发行版附带的 perl,您可能需要 安装包含 perl 库的单独包。

文档的这一部分给出了如何进行此构建的说明。

以前来过这里,我把这一切都放在Dockerfile中,欢迎您直接清除/使用。

我也刚刚将 amd64 图像 p6steve/raku-dan:paddle 推送到 docker hub,所以你可以去:

docker run -it p6steve/raku-dan:paddle
zef install Inline::Perl5

这也有 cpanm,所以你可以获取任何你想要的 cpan 模块。

【讨论】:

  • 您好,感谢您的回答,但问题并不是真正为我安装 Inline::Perl5,它是 ZEF 0.14.6 不知道模块“System::Query”,我不知道如何手动安装它
猜你喜欢
  • 2019-06-26
  • 1970-01-01
  • 2019-12-25
  • 2021-01-23
  • 2015-10-08
  • 2015-04-10
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多