Constructor error: failed to execute "git": no such file or directory

Ok, so I am setting up a modified bot-box, but after receiving all the necessary perl modules and libraries, I get 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"),$/;

What 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 smeggdrop.conf:

# 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
+3
source share
1 answer

The problem arises from source smeggdrop/smeggdrop.tcl:, smeggdrop.tclin turn, sources smeggdrop/versioned_interpreter.tclthat has a section such as:

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

This means that git must be in PATH, which can be found by this perl script.

Change the path in the right file (depending on the default shell) by adding the git directory and you will no longer have this problem. rcbin

+1

Source: https://habr.com/ru/post/1787373/


All Articles