简体   繁体   English

如何找到模块依赖并安装它但没有cpan / cpanm?

[英]How to find modules dependency & install it but without cpan/cpanm?

The problem is I don't have access to write $HOME directory. 问题是我没有写入$ HOME目录的权限。 (I only have access to create new directory on $HOME/app-root/data/) (我只能访问$ HOME / app-root / data /上的新目录)

because cpan/cpanm need to create new directory $HOME/.cpan/ I don't have idea how to find all modules dependency by hand (one-by-one). 因为cpan / cpanm需要创建新目录$ HOME / .cpan /我不知道如何手动(逐个)查找所有模块依赖项。

Do you guys know other method to install module (and find dependency) but without to create ~/.cpan/ directory ? 你们知道安装模块的其他方法(并找到依赖项)但是没有创建〜/ .cpan /目录吗?

or maybe how to override ~/.cpan/ to ~/app-root/data/.cpan ? 或者如何覆盖〜/ .cpan /到〜/ app-root / data / .cpan?

PS: Sorry my english is bad, english isn't my native language PS:抱歉我的英语不好,英语不是我的母语

只是(暂时)改变$HOME有写权限的目录:

HOME=$HOME/app-root/data/ cpanm Module

[An answer to the literal question is useful to people trying to install on a machine without internet, so I'll answer it even though it's not the best solution for you.] [文字问题的答案对于尝试在没有互联网的机器上安装的人有用,所以我会回答它,即使它不是最适合你的解决方案。]

To find the dependencies, you can use http://deps.cpantesters.org/ . 要查找依赖项,可以使用http://deps.cpantesters.org/ For example, here's the dependency tree for a module of mine . 例如,这是我的模块的依赖树。

只需在.openshift / cpan.txt中列出您需要的模块.Opennshift会在您部署时自动安装它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM