开发者

Error in constructor: couldn't execute "git": no such file or directory

Ok, so I am setting up a modified eggdrop bot, but after getting all the required perl modules and libraries, I am getting this error:

sudo perl run-test
Running bot 18076
tcltest

Error in constructor: couldn't execute "git": no such file or directory at tcltest.pl line 12.

Here is line 12 of tcltest.pl:

print $tcl->EvalFile("smeggdrop.tcl"),$/;

Which contains:

# smeggdrop.tcl
encoding system utf-8
set SMEGGDROP_ROOT [file dirname [info script]]

if [file exists smeggdrop.conf] {source smeggdrop.conf}
source $SMEGGDROP_ROOT/smeggdrop/smeggdrop.tcl

And smeggdr开发者_运维百科op.conf is:

# smeggdrop.conf
#
# HTTP limits
#
set smeggdrop_http_requests_per_eval  5                     ;# Maximum number of requests per eval per channel
set smeggdrop_http_request_interval   60                    ;# Interval for the smeggdrop_http_request_limit setting, in seconds
set smeggdrop_http_request_limit      25                    ;# Maximum number of requests per interval per channel
set smeggdrop_http_post_limit         150000                ;# Maximum POST body size
set smeggdrop_http_transfer_limit     150000                ;# Maximum GET response size
set smeggdrop_http_time_limit         5000                  ;# Maximum execution time, in milliseconds
set smeggdrop_log_max_lines           20                    ;# Maximum lines to record per channel

#
# Publish settings - comment these out if you don't want [publish]
#
# set smeggdrop_publish_url             http://www.example.org/           ;# URL to publish to
# set smeggdrop_publish_hostname        example.org                       ;# SSH hostname
# set smeggdrop_publish_username        myusername                        ;# SSH username
# set smeggdrop_publish_password        mypassword                        ;# SSH password
# set smeggdrop_publish_filename        /home/example/htdocs/index.txt    ;# Filename to write to


The problem comes from source smeggdrop/smeggdrop.tcl: smeggdrop.tcl, in turns, sources smeggdrop/versioned_interpreter.tcl which has a section like:

  method initialize_repository {} {
    mkdir_p [$self path]
    mkdir_p [$self path procs]
    mkdir_p [$self path vars]
    touch [$self path procs _index]
    touch [$self path vars _index]

    if ![$self repository_exists] {
      $self git init
      $self git add procs vars
      $self commit "Created repository"
    }
  }

That means git has to be in the PATH to be found by this perl script.

Modify the path in the right rc file (depending on your default shell), adding the git bin directory, and you won't have this issue anymore.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜