gpt4 book ai didi

perl - 我可以将 Perl 安装从一台计算机移动到另一台计算机吗?

转载 作者:行者123 更新时间:2023-12-01 05:57:20 25 4
gpt4 key购买 nike

我正在尝试设置一个依赖于几个 Perl 模块的应用程序,但我要安装的服务器没有 Internet 连接。我通过 ppd 文件阅读了有关离线模块安装的信息,但是我必须一一解决所有依赖项。考虑到我没有直接的互联网连接,这更加乏味。

我希望找到一个解决方案,在我的 PC 上安装 ActivePerl 并安装我想要的所有库,然后将目录复制粘贴到我的服务器。如果只是修复一些环境变量的问题,那很好。只想知道要修改的变量的最终列表。不确定是否必须在要运行它的计算机上安装 perl 库? (一个是 32 位平台,一个是 64 位,但是服务器已经在运行各种 32 位应用程序,所以我希望这不是一个大问题)为了获得最佳兼容性,我计划在两个系统上安装 ActivePerl 并合并库目录相同。

最佳答案

答案是 Perl FAQ ,我的坏事没有正确处理。

I copied the perl binary from one machine to another, but scripts don't work.
That's probably because you forgot libraries, or library paths differ.
You really should build the whole distribution on the machine it will
eventually live on, and then type "make install". Most other approaches
are doomed to failure.

One simple way to check that things are in the right place is to print
out the hard-coded @INC that perl looks through for libraries:

% perl -le 'print for @INC'

If this command lists any paths that don't exist on your system, then
you may need to move the appropriate libraries to these locations, or
create symbolic links, aliases, or shortcuts appropriately. @INC is also
printed as part of the output of

% perl -V

You might also want to check out "How do I keep my own module/library
directory?" in perlfaq8.

关于perl - 我可以将 Perl 安装从一台计算机移动到另一台计算机吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2949368/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com