【问题标题】:Cannot install perl module Apache2::Const in ubuntu无法在 ubuntu 中安装 perl 模块 Apache2::Const
【发布时间】:2023-03-08 05:15:01
【问题描述】:

我在安装 perl 模块 Apache2::Const 时遇到问题。

当我尝试使用 cpan.pm 安装它时,它显示以下错误

Warning: Cannot install Apache2::Const, don't know what it is.

我使用的是 Ubuntu 12.04、Apache/2.2.22、Perl 5.14。

【问题讨论】:

  • 请分享您使用的确切命令

标签: perl apache apache2 cpan apache-modules


【解决方案1】:

Apache2::Const 是 mod_perl 的一部分。

如果您使用的是 ubuntu 提供的 apache,您可能只想:

sudo apt-get install libapache2-mod-perl2

【讨论】:

    【解决方案2】:

    看这个网站

    http://ubuntuforums.org/archive/index.php/t-1747708.html

    尝试:

    apt-get install apache2-mpm-prefork
    

    【讨论】:

      【解决方案3】:

      我刚刚在 Ubuntu 12.04 上花了一个小时解决完全相同的问题,终于弄明白了。我已经安装了 libapache2-mod-perl2 :

      $ sudo apt-get install libapache2-mod-perl2
      Reading package lists... Done
      Building dependency tree   
      Reading state information... Done
      libapache2-mod-perl2 is already the newest version.
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      

      尽管如此,当我尝试通过 cpan 安装 Apache2::Const 模块时,我一直收到同样的错误:

      $ cpan Apache2::Const
      Going to read '/home/jdoe/.cpan/Metadata'
        Database was generated on Sun, 27 Apr 2014 08:29:02 GMT
      Warning: Cannot install Apache2::Const, don't know what it is.
      Try the command
      
          i /Apache2::Const/
      
      to find objects with matching identifiers.
      

      当安装 libapache2-mod-perl2 时,我终于发现 Apache2::Const 已经安装(我想是二进制):

      $ perl -MApache2::Const < /dev/null
      $
      

      因此 Apache2::Const 不应该使用 cpan 安装。

      【讨论】:

        猜你喜欢
        • 2023-03-27
        • 1970-01-01
        • 1970-01-01
        • 2016-10-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-08-01
        相关资源
        最近更新 更多