也许这是一个愚蠢的问题?如果我安装一个像File使用的模块
cpanm File
Run Code Online (Sandbox Code Playgroud)
将它安装下的一切File,喜欢File:Listing等?
我正在尝试使用 cpanfile 和 cpanm 来安装大量模块。其中一个模块 Unicode::String 在 CPAN 上有一个错误,作者仅在 Github 上修复了该错误。(https://github.com/msouth/Unicode-String)
是否可以将 Github 存储库列为 cpanfile 中的要求,并从那里而不是从 CPAN 安装 cpanm?如果是这样,这样做的正确语法是什么?
我发现的最接近的是 2013 年的一条线索,宫川说它将在未来的版本中推出,然后未来的版本很脆弱并且被搁置:
https://github.com/perl-carton/carton/issues/132 (这里讨论 carton,但由于它们都使用 cpanfile,因此语法应该相同。)
我的plenv设置发生了一些古怪的事情,我没有理解它.
plenv install-cpanm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 297k 100 297k 0 0 1571k 0 --:--:-- --:--:-- --:--:-- 1567k
!
! Can't write to /Library/Perl/5.18 and /usr/local/bin: Installing modules to /Users/olaf/perl5
! To turn off this warning, you have to do one of the following:
! - run me as a root or with --sudo option (to install to /Library/Perl/5.18 and /usr/local/bin)
! - Configure local::lib …Run Code Online (Sandbox Code Playgroud) 在我使用cpanm在“新”(对我而言)系统上安装一些 Perl 模块之前,我想知道默认情况下它们将安装在哪里。
我没有看到任何类型的试运行选项,这正是我所希望的。
perl -V 包括这个 %ENV 和 @INC 信息:
%ENV:
PERL5LIB="/home/randall/perl5/lib/perl5"
PERL_HOMEDIR="1"
PERL_LOCAL_LIB_ROOT="/home/randall/perl5"
PERL_MB_OPT="--install_base /home/randall/perl5"
PERL_MM_OPT="INSTALL_BASE=/home/randall/perl5"
@INC:
/home/randall/perl5/lib/perl5
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
Run Code Online (Sandbox Code Playgroud)
这是否定义了行为,还是有其他考虑?具体来说,cpanm 的文档包括:
Run Code Online (Sandbox Code Playgroud)-l, --local-lib Sets the local::lib compatible path to install modules to. You don't need to set this if you already configure the shell environment variables using local::lib, but this can be used to override that as well.
但它并没有指出哪些环境变量是重要的。
我知道您可以轻松配置cpan以使用特定的镜像.但是我最近在朋友的建议下开始使用cpanm,而且我似乎找不到设置默认镜像的方法,而不是--mirror http://cpan.metacpan.org每次都在命令行上指定.
是否有环境变量或配置文件,我可以设置默认镜像?
至于为什么我不想使用默认的镜像列表,我是一个FI,我们被防火墙一直没有结束.我们的防火墙只允许一面镜像.
我有一个BitBucket管道,该管道使用cpanm安装了一堆Perl模块。其中之一失败了,这是我在日志中看到的摘录:
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/ack-v3.0.2.tar.gz ... OK
Configuring ack-v3.0.2 ... OK
==> Found dependencies: File::Next
--> Working on File::Next
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/File-Next-1.16.tar.gz ... OK
Configuring File-Next-1.16 ... OK
Building and testing File-Next-1.16 ... OK
Successfully installed File-Next-1.16
! Installing App::Ack failed. See /root/.cpanm/work/1562605191.55/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'App::Ack' is not installed
! Bailing out the installation for ..
Building and testing ack-v3.0.2 ... FAIL
Run Code Online (Sandbox Code Playgroud)
如何访问安装过程中创建的build.log?
试图DBD::mysql在运行mysql v 5.7.17的Mac Sierra计算机上安装.尝试安装时出现以下错误cpanm install DBD::mysql:
Checking if libs are available for compiling...
Can't link/include C library 'ssl', 'crypto', aborting.
到目前为止我发现的其他解决方案并没有解决Sierra的问题.
我想知道为什么即使已经安装了依赖项,我也会收到“安装依赖项失败:未安装模块‘模块::名称’”。我正在使用perlbrew和cpanm。以下是我尝试安装的许多模块所发生情况的示例:
URI::ws如下Run Code Online (Sandbox Code Playgroud)hamid@caspian:~$ /home/hamid/perl5/perlbrew/bin/cpanm --installdeps URI::ws --> Working on URI::ws Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/URI-ws-0.03.tar.gz ... OK Configuring URI-ws-0.03 ... OK ==> Found dependencies: URI --> Working on URI Fetching http://www.cpan.org/authors/id/E/ET/ETHER/URI-1.67.tar.gz ... OK Configuring URI-1.67 ... OK Building and testing URI-1.67 ... OK Successfully installed URI-1.67 ! Installing the dependencies failed: Module 'URI' is not installed ! Bailing out the installation for URI-ws-0.03. 1 distribution installed
URI没有安装。所以我安装URI如下:Run Code Online (Sandbox Code Playgroud)hamid@caspian:~$ /home/hamid/perl5/perlbrew/bin/cpanm URI --> Working on …
我正在尝试像这样从 cpanm 安装 PAR:cpanm App::Packer::PAR,但它给了我这个错误:
skipping R/RJ/RJBS/perl-5.22.0.tar.bz2
! Installing the dependencies failed: Module ExtUtils::Embed is not installed
! Bailing out the installation for PAR-Packer-1.026.
Run Code Online (Sandbox Code Playgroud)
尽管 cpanm 应该自动安装依赖项,但我尝试手动安装它:cpanm ExtUtils::Embed,但只得到了相同的错误:skipping R/RJ/RJBS/perl-5.22.0.tar.bz2
关于为什么会失败以及如何使其工作有任何想法吗?
您好,我正在尝试使用 cpanm 安装 perl 模块。但是我的防火墙不允许 cpanm 使用 http。即使我使用 --mirror 选项强制它使用 https,它仍然使用 http 来安装依赖项。我如何强制 cpanm 仅使用https://mirror-address。
Perl Version 5.16.3
Cpanm Version 1.6922
Run Code Online (Sandbox Code Playgroud)