本地 cpan 构建

发布于 2024-09-14 17:40:36 字数 543 浏览 5 评论 0原文

我想使用主目录特定的非根目录来存放从 cpan 安装的内容。我该如何配置它?

正常的 CPAN 配置尝试将软件包安装到 /usr 中。添加 'makepl_arg' => 后q[PREFIX=~/cpan_local],简单的包似乎可以构建,但我无法构建提取其依赖项的包 - 找不到依赖项。

我将其更改为 'makepl_arg' => 后q[PREFIX=~/cpan_local LIB=~/cpan_local],我收到以下消息: 警告:先决条件 'ExtUtils::CBuilder => 'D/DA/DAGOLDEN/Module-Build-0.3607.tar.gz' 的 0.27' 已安装,但安装看起来很可疑。跳过另一次安装尝试,以防止无限循环。

我如何正确配置它?我希望构建的所有内容都能自动对 ~/cpan_local 执行。 (或者对于熟悉 python 的人来说,我希望它像 virtual-env 一样工作并从中运行 easy_install)。

I'd like to use a home directory specific, non-root directory for stuff I install from cpan. How can I configure it?

Normal CPAN configuration tries to install packages into /usr. After adding 'makepl_arg' => q[PREFIX=~/cpan_local], simple packages seem to build, but I cannot build a package that pulls its dependencies - the dependency is not found.

After I changed it to 'makepl_arg' => q[PREFIX=~/cpan_local LIB=~/cpan_local], I get the following message: Warning: Prerequisite 'ExtUtils::CBuilder => 0.27' for 'D/DA/DAGOLDEN/Module-Build-0.3607.tar.gz' already installed but installation looks suspicious. Skipping another installation attempt, to prevent looping endlessly.

How can I configure this properly? I want everything that's built to do to ~/cpan_local automatically. (or for people familiar with python, I'd like this to work like virtual-env and running easy_install from it).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柠檬色的秋千 2024-09-21 17:40:36

更好的是,首先安装 App::cpanminus。然后只需使用它作为普通用户安装模块即可。如果该用户无法写入 /usr/local/lib/perl* 目录,它将诉诸于写入其主目录,或者您向其传递 -l--local-lib 选项直接将其安装在您的主目录中,而无需确定是否可以在系统范围内安装它们。

最后,安装 local::lib 并使用 自动设置环境。 bashrc 文件将允许您省略 --local-lib 选项并直接安装到您的主目录。

Even better, install App::cpanminus first. Then just use it to install modules as a regular user. If this user can't write to the /usr/local/lib/perl* directories it will resort to writing in its home directory, or you pass it the -l or --local-lib option to directly install it in your home directory without it figuring out if it can install them system wide.

Finally, installing local::lib and setting up your environment automatically with your .bashrc file will allow you to omit the --local-lib option and install to your home directory directly.

給妳壹絲溫柔 2024-09-21 17:40:36

使用 local::lib。引导指令应该可以满足您的需要。

Use local::lib. The bootstrap instructions should do the trick for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文