gpt4 book ai didi

perl - 模块安装成功但找不到

转载 作者:行者123 更新时间:2023-12-02 18:33:55 25 4
gpt4 key购买 nike

我想知道为什么即使已经安装了依赖项,我也会收到“安装依赖项失败:模块'Module::Name'未安装”的消息。我正在使用 perlbrewcpanm。以下是我尝试安装的许多模块所发生情况的示例:

  1. 我尝试安装例如 URI::ws 如下
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 如下:
  • hamid@caspian:~$ /home/hamid/perl5/perlbrew/bin/cpanm 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
    1 distribution installed
  • 我回到我最初想要的 URI::ws,这是我得到的:
  • hamid@caspian:~$ /home/hamid/perl5/perlbrew/bin/cpanm 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

    谁能告诉我为什么会发生这种情况以及我可以采取什么措施来阻止它?如果我遗漏了您需要的更多信息,请告诉我。

    谢谢

    最佳答案

    感谢https://stackoverflow.com/users/2019415/g-cito

    hamid@caspian:~$ PERL_MM_OPT=""; PERL_MB_OPT="";

    已经完成了工作:)

    local::lib 搞砸了。 URI.pm 已安装,但不在 perlbrew 目录下。

    关于perl - 模块安装成功但找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28963882/

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