clintongormley/ElasticSearch.pm — Issue #27: Installing ElasticSearch.pm
Author: nickhoffman
Created: 2012-02-13 17:10:25+00:00
State: open

Hey Clint. Having been away from Perl for the better part of 10 years, I couldn't remember how to install ElasticSearch.pm . I asked in #elasticsearch on Freenode, and t0m kindly said `cpan ElasticSearch` will install the module.

However, when I ran `cpan ElasticSearch`, the installation failed, but CPAN thought it succeeded:

```
$ cpan ElasticSearch

...snip...

ElasticSearch-0.47/t/request_tests/search_indices_boost.pl
ElasticSearch-0.47/t/request_tests/search_script_fields.pl
CPAN: File::Temp loaded ok (v0.22)
CPAN: Time::HiRes loaded ok (v1.9719)

CPAN.pm: Going to build D/DR/DRTECH/ElasticSearch-0.47.tar.gz

Module::Build version 0.3601 required--this is only version 0.340201 at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.
Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
DRTECH/ElasticSearch-0.47.tar.gz
/usr/bin/perl Build.PL --installdirs site -- NOT OK
Running Build test
Make had some problems, won't test
Running Build install
Make had some problems, won't install
Could not read '/home/nick/.cpan/build/ElasticSearch-0.47-C7bQuN/META.yml'. Falling back to other methods to determine prerequisites
CPAN: Module::Build loaded ok (v0.340201)
$
$ echo $?
0
```

t0m said that I should run `cpan Module::Build && cpan ElasticSearch`.

Here's some more discourse from #elasticsearch:

```
16:56 < t0m> I think if your CPAN itself was newer, then it'd have done the right thing.
16:56 < t0m> but ElasticSearch uses Module::Build, which is needed at package configure time...
16:57 < t0m> As your CPAN is antideluvian, it doesn't have configure_requires support
16:57 < t0m> so ES just bums out as it can't get it's installer installed...
16:57 < t0m> Using a less retarded installer is the correct fix author side
16:58 < t0m> the 'correct' fix your side it to make your toolchain not so ancient :)
16:58 < t0m> just installing new Module::Build will fix this issue however - as you won't have the chicken and egg problem you're currently having :)
16:58 < nick_h> t0m: interesting. thanks for the explanation
16:59 < nick_h> i'm running an old version of Ubuntu (10.10), so that's probably why i have an old version of CPAN
```