无法在 Ubuntu 14.04 AWS 上找到包 python-certbot-apache

San*_*ati 9 php apache ssl-certificate

我曾尝试在 apache 上安装 certbot SSL 证书。我执行了以下命令。

  1. 须藤添加-apt-repository ppa:certbot/certbot
  2. sudo apt-get 更新
  3. 须藤 apt-get 安装 python-certbot-apache

运行第三个命令后,我得到以下错误。 “无法找到包 python-certbot-apache”

如果有人能帮我解决这个问题,那就太好了。

phi*_*e_b 17

在最新的 Ubuntu 版本中,Certbot 及其 Apache 插件可以通过以下方式安装:

sudo apt install -y certbot python3-certbot-apache
Run Code Online (Sandbox Code Playgroud)

(注意“python3”,而大多数资源只提到“python”)


Fin*_*sse 13

Certbot 不再支持 Ubuntu 14 上的 apt-get 安装。但是你仍然可以安装。为此,请通过 SSH 登录服务器并运行:

wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot
sudo chown root /usr/local/bin/certbot
sudo chmod 0755 /usr/local/bin/certbot
Run Code Online (Sandbox Code Playgroud)

然后certbot照常使用。

来源:https : //certbot.eff.org/lets-encrypt/pip-apache

如果您收到类似 的错误CryptographyDeprecationWarning: Support for your Python version is deprecated,则:

# Remove the Certbot virtual environment
rm -r /opt/eff.org/certbot/

# Install a new version of Python 2.7
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xfz Python-2.7.18.tgz
cd Python-2.7.18/
sudo ./configure --prefix /usr/local/lib/python2.7.18
sudo make && sudo make install
cd ..
rm -r Python-2.7.18.tgz Python-2.7.18

# And run Certbot once with the new Python:
PATH=/usr/local/lib/python2.7.18/bin:$PATH certbot renew
Run Code Online (Sandbox Code Playgroud)

然后certbot照常运行。


Dil*_*ara 9

我遇到了同样的问题,尽管如果您sudo在开始时删除,那么它会显示

apt-get install python-certbot-apache
Run Code Online (Sandbox Code Playgroud)

它为您提供了更新版本的提示。
所以,如果你使用它应该这样做

sudo apt install python3-certbot-apache
Run Code Online (Sandbox Code Playgroud)
sudo apt install -y certbot python3-certbot-apache
Run Code Online (Sandbox Code Playgroud)


小智 5

我遇到了同样的问题,尽管如果您sudo在开始时删除,那么它会显示

apt-get install python-certbot-apache
Run Code Online (Sandbox Code Playgroud)

它为您提供了更新版本的提示。
所以,如果你使用它应该这样做

sudo apt install python3-certbot-apache
Run Code Online (Sandbox Code Playgroud)