我从 pip3 安装了 certbot:
# pip3 freeze|grep -i certbot
certbot==1.5.0
certbot-apache==1.5.0
certbot-dns-digitalocean==1.5.0
Run Code Online (Sandbox Code Playgroud)
我可以以 root 身份从命令行运行 certbot,但我将 crontab 配置perl -e 'sleep int(rand(1800))' && certbot -q renew为每周以 root身份运行两次,并通过电子邮件收到此错误消息:
/bin/sh: 1: certbot: not found
Run Code Online (Sandbox Code Playgroud)
如果我whereis certbot在命令行输入,我会得到这个结果:
certbot: /usr/local/bin/certbot
Run Code Online (Sandbox Code Playgroud)
为什么 certbot 不能从 crontab 成功运行?
我正在使用 Ubuntu 18.04。