【问题标题】:Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable找不到可用的“nginx”二进制文件。确保 nginx 存在,二进制文件是可执行的
【发布时间】:2021-07-07 00:20:30
【问题描述】:

我正在尝试在我的数字海洋水滴上安装 certbot。我正在使用 ubuntu 20.04 并按照 https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx 的说明进行操作。

当我运行sudo certbot --nginx 时发生错误。我得到的错误是:

The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError("Could not find a usable 'nginx' binary. 
Ensure nginx exists, the binary is executable, and your PATH is set correctly.")

这是我第一次使用数字海洋,所以请解释一下解决方案。谢谢。

【问题讨论】:

    标签: ubuntu nginx certificate


    【解决方案1】:

    接受的答案对我没有帮助,因为当我从 Ubuntu 18 升级时,我的 certbot 已正确安装。但是,我确实通过运行以下命令获得了更多有用的调试信息:

    sudo /usr/bin/certbot renew --nginx --debug-challenges -v
    

    如果输出过于冗长,则删除最后的-v,无论哪种方式,它都应该让您更好地了解错误的根本原因是什么。

    【讨论】:

      【解决方案2】:

      certbot snap 包似乎有问题,你可以尝试从 snap 中删除它,然后使用 apt 重新安装 certbot。

      你可以关注this tutorial

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-12-02
        • 2015-09-27
        • 1970-01-01
        • 2018-04-17
        • 2011-09-11
        • 2021-07-25
        • 1970-01-01
        • 2010-11-05
        相关资源
        最近更新 更多