如何设置 Carton,编译 znapzend 0.20.0?

如何设置 Carton,编译 znapzend 0.20.0?

从源代码编译时使用:

# ./configure --prefix=/opt/znapzend-0.20.0
# make 
# make install

我收到此错误: ! Couldn't find module or a distribution Carton

我可以从源代码编译版本 0.19.1,没有任何问题。我使用 0.19.1 已经有一段时间了,我对 znapzend 非常满意!感谢您所做的一切工作。当我想升级到 0.20.0 时,我遇到了这个问题。

我正在使用 Ubuntu 20.04。我尝试像这样安装 Carton:

# apt install carton
# carton -v
carton v1.0.34

但是安装 carton 后,编译时仍然出现同样的错误。

README 包含编译版本 0.19.2 的说明,但不包含使用 carton 进行更好的依赖性跟踪的版本 0.20.0 的说明。

您能否帮助我设置 Carton,以便我可以编译 znapzend 0.20.0?

答案1

我找到了问题。Carton 是一个 Perl 模块依赖管理器,它使用 CPAN 安装 Perl 模块。安装 Carton 还不够。Ubuntu 默认安装了 CPAN,但我的系统上还没有配置它。

我这样配置了 CPAN:

# sudo cpan
Loading internal logger. Log::Log4perl recommended for better logging

CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes] 

Autoconfiguration complete.

commit: wrote '/root/.cpan/CPAN/MyConfig.pm'

You can re-run configuration any time with 'o conf init' in the CPAN shell
Terminal does not support AddHistory.

并让它自动配置。之后,我可以毫无问题地编译 znapzend 0.20.0。

相关内容