如何在没有互联网连接的情况下在 ActivePerl 中安装软件包?
在 ActivePerl 中,“ppm”从 Internet 安装软件包,“ppm install x.ppd”从 ppd 文件安装,但大多数 CPAN 软件包都以 .tar.gz 形式分发
。一台运行 ActivePerl 且没有 Internet 连接的机器? (“make”可能不可用。)
更新:可以使用互联网连接下载文件并使用 USB 密钥等将其传输到计算机。
In ActivePerl, "ppm" installs a package from the Internet, "ppm install x.ppd" installs from a ppd file, but most CPAN packages are distributed as .tar.gz
How do you supply modules to a machine running ActivePerl that doesn't have an Internet connection? ("make" will probably not be available.)
Update: an Internet connection can be used to download files and transfer them to the machine with a USB key, etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我确信有一种更简单的方法,但我刚刚检查了一个 ppd 文件,它只是一个 xml 文件...
因此,如果您想在没有连接的电脑上手动安装,您应该能够执行以下操作
: file , ex
并下载 CODEBASE 标记中指向的相应文件,在这种情况下:
将两个文件放在没有连接的电脑上,CODEBASE HREF="xxx" 应该指向 zip 文件(或者通过将文件放入相同的相对子文件夹或通过修复 href 使其指向磁盘上的 zip 文件)
使用以下命令从 ppd 安装
I am sure there is an easier way, but I just checked a ppd file and it is just an xml file ...
So you should be able to do the following if you want to install manually on a pc with no connection:
Open the file , ex
and download the appropriate file pointed to in the CODEBASE tag, in this case:
Put both file on the pc with no connection, CODEBASE HREF="xxx" should be pointing to the zip file (either by putting the file in the same relative subfolder or by fixing the href so it points to the zip file on your disk)
Install from the ppd using
请参阅:http://docs.activestate.com/activeperl/ 5.10/faq/ActivePerl-faq2.html#zip_files
See: http://docs.activestate.com/activeperl/5.10/faq/ActivePerl-faq2.html#zip_files
我知道这不是您问题的答案,但如果可能的话请考虑使用 Strawberry Perl,这是一种 CPAN 友好的 Perl 发行版对于 Windows。 它有一个整洁的安装程序,附带 make、一个编译器和一个正确配置的 CPAN shell,一切准备就绪。
然后您可以使用 minicpan 之类的东西来创建离线 CPAN 存储库。
不要成为二等 Perl 公民,必须等待其他人为您编译 ppm,直接从 CPAN 消防水管喝水!
I know it's not an answer to your question, but if possible consider using Strawberry Perl, a CPAN-friendly distribution of Perl for Windows. It has a tidy installer, ships with make, a compiler and a properly configured CPAN shell all ready to go.
And then you can use something like minicpan to create an offline CPAN repository.
Don't be a second class Perl citizen and have to wait for someone else to compile you a ppm, drink straight from the CPAN firehose!
由于这是一个非常常见的情况,我在这里完成答案:
就 ActivePerl 5.14 而言,您还可以下载适合您平台的“.tar.gz”文件,或下载所谓的“.ppmx”文件(相同格式) 。 保存文件并稍后在离线时调用 ppm 安装程序:
Since this is a very frequent scenario, I complete the answers here :
As far as ActivePerl 5.14 is concerned you can also download ".tar.gz" files for your platform, or download so-called ".ppmx" files (same format). Save the files and invoke the ppm installer later when offline :
您可能对Win32 安装模块指南感兴趣。 它有点过时了(它谈论的是命令行 ppm),但原理保持不变。
You might be interested in A guide to installing modules for Win32. It's a bit outdated (it talks about the command-line ppm) but the principles remain the same.