certbot 版本升级未实现

certbot 版本升级未实现

我想更新certbot以应对以下主题: 如何在 Certbot 中停止使用 TLS-SNI-01

升级前:certbot --version返回:certbot 0.26.1

按照指示如何在 Certbot 中停止使用 TLS-SNI-01,我想更新到0.28以上的版本。

我已经看过如何升级ubuntu我已经执行过:

apt-get install –only-upgrade python-certbot-apache

它返回:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-json php7.0-opcache
  php7.0-readline python-acme python-augeas python-certbot python-cffi-backend
  python-chardet python-configargparse python-configobj python-cryptography
  python-dialog python-dnspython python-enum34 python-funcsigs python-idna
  python-ipaddress python-mock python-ndg-httpsclient python-openssl
  python-parsedatetime python-pbr python-pyasn1 python-requests python-rfc3339
  python-six python-tz python-urllib3 python-zope.component python-zope.event
  python-zope.hookable python-zope.interface
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  python-certbot-apache
1 upgraded, 0 newly installed, 0 to remove and 270 not upgraded.
Need to get 3872 B of archives.
After this operation, 3072 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial/main amd64 python-certbot-apache all 0.28.0-1+ubuntu16.04.1+certbot+3 [3872 B]
Fetched 3872 B in 0s (28.3 kB/s)
(Reading database ... 38437 files and directories currently installed.)
Preparing to unpack .../python-certbot-apache_0.28.0-1+ubuntu16.04.1+certbot+3_all.deb ...
Unpacking python-certbot-apache (0.28.0-1+ubuntu16.04.1+certbot+3) over (0.25.0-2+ubuntu16.04.1+certbot+1) ...
Setting up python-certbot-apache (0.28.0-1+ubuntu16.04.1+certbot+3) ...

看起来更新成功了。

当我certbot --version这样做时它仍然返回:certbot 0.26.1

答案1

您有 270 个未升级的软件包,可能存在一些依赖项。如果您需要保留某些软件包的当前版本,请使用sudo apt-mark hold package-name并升级其余软件包。或者找到应升级的依赖项。

当我仅使用时,我的服务器certbot升级没有任何问题sudo apt upgrade


根据 OP 的报告,该问题的具体答案是两个包都python3-certbot必须python3-certbot-apache升级。

答案2

诀窍是使用

sudo apt-get dist-upgrade

如果您只是使用 sudo apt-get upgrade,它将找不到新的软件包。

以下是我在 Ubuntu 16 上将 certbot 从 0.26 升级到 0.28 的完整步骤:

1.) 检查 certbot 版本。如果低于 0.28,则需要更新。

certbot --version || /path/to/certbot-auto --version

2.)运行这些命令来更新 certbot

sudo apt-get update
sudo apt-get dist-upgrade

3.) 为 certbot 禁用 tls-sni-01

sudo sh -c "sed -i.bak -e 's/^\(pref_challs.*\)tls-sni-01\(.*\)/\1http-01\2/g' /etc/letsencrypt/renewal/*; rm -f /etc/letsencrypt/renewal/*.bak"

4.)重新运行 certbot:

sudo certbot renew --dry-run

相关内容