2

I'm trying to install Gitolite as in the http://wiki.dreamhost.com/Gitolite

I get the error like :

"make_path" is not exported by the File::Path module
Can't continue after import errors at gitolite/src/gl-system-install line 5
BEGIN failed--compilation aborted at gitolite/src/gl-system-install line 5.

There is a problem with perl but I could not find solution yet.

server capabilities
/usr/local/bin/perl
perl v5.10.0

Greg Bacon
  • 134,834
  • 32
  • 188
  • 245
kLezer
  • 211
  • 1
  • 7
  • My dreamhost server (twins.dreamhost.com) has 5.10.1, which has File::Path 2.07_03. Maybe they can switch your server if they can't upgrade your File::Path. Otherwise, you could use [`perlbrew`](http://search.cpan.org/perldoc?perlbrew) to install your own version of Perl. Note that one of the Cwd tests fails on dreamhost, but it's harmless to ignore the failure. – ikegami Mar 08 '12 at 23:12

3 Answers3

3

make_path was introduced in File::Path 2.06_05. You must be using an older version (Perl 5.10.0 came with File::Path 2.04). Upgrade File::Path (or upgrade Perl, since 5.10 is no longer supported).

cjm
  • 61,471
  • 9
  • 126
  • 175
2

make_path is only available in File::Path 2.07. I'm not sure if it's your problem or not, but you might try updating File::Path:

cpan File::Path

or

cpanp i File::Path

Zac B
  • 3,796
  • 3
  • 35
  • 52
2

At press time, gl-system-install calls make_path in one place, in the sub that begins at line 75:

sub check_dirs {
    for my $dir ( $bin_dir, $conf_dir, $hooks_dir ) {
        die "$dir should be an absolute path\n" unless $dir =~ m(^/);
        make_path($dir);
        -d $dir or die "$dir does not exist and could not be created\n";
    }
}

This particular usage is call-compatible with mkpath instead. You don’t have to install a new File::Path module. Change line 5 of gl-system-install to

use File::Path qw(mkpath);

and line 78 to

mkpath($dir);

I encountered the same situation within the last week. After making the changes above, you can follow gitolite’s installation instructions with no further snags.


Update: This issue is now fixed in the gitolite repository.

Greg Bacon
  • 134,834
  • 32
  • 188
  • 245