【问题标题】:Gitolite on DreamhostDreamhost 上的 Gitolite
【发布时间】:2012-03-09 11:16:36
【问题描述】:

我正在尝试安装 Gitolite,就像在 http://wiki.dreamhost.com/Gitolite 中一样

我收到如下错误:

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

perl 有问题,但我还没有找到解决方案。

服务器功能
/usr/local/bin/perl
perl v5.10.0

【问题讨论】:

  • 我的 Dreamhost 服务器 (twins.dreamhost.com) 有 5.10.1,它有 File::Path 2.07_03。如果他们无法升级您的 File::Path,也许他们可以切换您的服务器。否则,您可以使用perlbrew 安装您自己的 Perl 版本。请注意,Dreamhost 上的 Cwd 测试之一失败,但忽略失败是无害的。

标签: perl git dreamhost gitolite


【解决方案1】:

make_path 在 File::Path 2.06_05 中引入。您必须使用旧版本(Perl 5.10.0 附带 File::Path 2.04)。升级 File::Path(或升级 Perl,因为 5.10 is no longer supported)。

【讨论】:

    【解决方案2】:

    At press timegl-system-install 在一个地方调用make_path,在以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";
        }
    }
    

    这种特殊用法与mkpath 兼容。您不必安装新的 File::Path 模块。将gl-system-install 的第 5 行更改为

    use File::Path qw(mkpath);
    

    和第 78 行到

    mkpath($dir);
    

    上周我遇到了同样的情况。进行上述更改后,您可以关注gitolite’s installation instructions,而不会有任何障碍。


    更新:这个问题现在是fixed in the gitolite repository

    【讨论】:

    • 太棒了!工作就像一个魅力:) 你让我省了很多麻烦。
    【解决方案3】:

    make_path 仅在 File::Path 2.07 中可用。我不确定这是否是您的问题,但您可以尝试更新 File::Path:

    cpan File::Path

    cpanp i File::Path

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-05-03
      • 1970-01-01
      • 2012-06-15
      • 2013-07-07
      • 1970-01-01
      • 2013-04-07
      • 2012-10-12
      相关资源
      最近更新 更多