构造函数中的错误:无法执行“git”:没有这样的文件或目录
好的,所以我正在设置一个修改后的 Eggdrop 机器人,但是在获取所有必需的 Perl 模块和库后,我收到此错误:
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.
这是 tcltest.pl 的第 12 行:
print $tcl->EvalFile("smeggdrop.tcl"),$/;
其中包含:
# 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
并且 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题来自
源smeggdrop/smeggdrop.tcl
:smeggdrop.tcl
依次来源smeggdrop/versioned_interpreter.tcl
其中有一个部分如下:这意味着 git 必须位于
PATH
中才能被此 perl 脚本找到。修改右侧的路径< code>rc 文件(取决于您的默认 shell),添加 git
bin
目录, 这样您就不会再遇到此问题了。The problem comes from
source smeggdrop/smeggdrop.tcl
:smeggdrop.tcl
, in turns, sourcessmeggdrop/versioned_interpreter.tcl
which has a section like: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 gitbin
directory, and you won't have this issue anymore.