VPS 站用的 Certbot 是用 apk 裝的,一開始還能用,也順利地申請了憑證
後來不知發生什麼問題,在更新時都會出現以下內容

Traceback (most recent call last):
File “/usr/bin/certbot”, line 33, in
sys.exit(load_entry_point(‘certbot==1.10.1’, ‘console_scripts’, ‘certbot’)())
File “/usr/bin/certbot”, line 25, in importlib_load_entry_point
return next(matches).load()
File “/usr/lib/python3.8/importlib/metadata.py”, line 77, in load
module = import_module(match.group(‘module’))
File “/usr/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/usr/lib/python3.8/site-packages/certbot/main.py”, line 2, in
from certbot._internal import main as internal_main
File “/usr/lib/python3.8/site-packages/certbot/_internal/main.py”, line 16, in
from certbot import crypto_util
File “/usr/lib/python3.8/site-packages/certbot/crypto_util.py”, line 32, in
from certbot import util
File “/usr/lib/python3.8/site-packages/certbot/util.py”, line 24, in
from certbot._internal import constants
File “/usr/lib/python3.8/site-packages/certbot/_internal/constants.py”, line 4, in
import pkg_resources
File “/usr/lib/python3.8/site-packages/pkg_resources/init.py”, line 3239, in
def _initialize_master_working_set():
File “/usr/lib/python3.8/site-packages/pkg_resources/init.py”, line 3222, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3.8/site-packages/pkg_resources/init.py”, line 3251, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3.8/site-packages/pkg_resources/init.py”, line 569, in _build_master
return cls._build_from_requirements(requires)
File “/usr/lib/python3.8/site-packages/pkg_resources/init.py”, line 582, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File “/usr/lib/python3.8/site-packages/pkg_resources/init.py”, line 775, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (cryptography 2.9.2 (/usr/lib/python3.8/site-packages), Requirement.parse(‘cryptography>=3.2’), {‘PyOpenSSL’})

看不太懂,所以 Google 一下找到可以用 pip 安裝新版本,就這樣裝下去

# /usr/bin/python3 -m pip install --upgrade pip
# pip install certbot
# /usr/bin/certbot renew

順利更新