-1

I am having problem with installing perl module Apache2::Const.

When i am trying to install it using cpan.pm it shows the following error

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

I am using Ubuntu 12.04, Apache/2.2.22 ,Perl 5.14.

user1146332
  • 2,630
  • 1
  • 15
  • 19
Hafsal
  • 81
  • 2
  • 7

3 Answers3

2

Apache2::Const is part of mod_perl.

If you are using the ubuntu-provided apache, you probably just want to:

sudo apt-get install libapache2-mod-perl2
ysth
  • 96,171
  • 6
  • 121
  • 214
0

Looking at this website

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

try:

apt-get install apache2-mpm-prefork
Impulss
  • 271
  • 4
  • 19
0

I just spent an hour on the exact same problem on Ubuntu 12.04, and finally figured it out. I had already installed 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.

Nonetheless, I kept getting the same error when I tried to install the Apache2::Const module via cpan:

$ 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.

I finally figured out that Apache2::Const is already installed (in binary I suppose) when libapache2-mod-perl2 is installed:

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

Therefore Apache2::Const is not supposed to be installed using cpan.

DavidBooth
  • 101
  • 1
  • 9