我正在尝试在运行 Debian 的 ReadyNAS 上续订 SSH 证书。我怀疑几个月前更新 Apache 和其他潜在软件包的固件升级可能破坏了我每晚运行的 Let's Encrypt 续订流程。当脚本运行时,会出现以下输出:
root@GeoffNAS:/home/admin# ./letsencrypt-renew.sh
Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
**(snip for brevity)**
virtualenv is already the newest version (15.1.0+ds-2+rnx1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-virtualenv : Depends: python-pip-whl (>= 8.1.1-2) but 1.5.6-5 is to be installed
E: Unable to correct problems, you have held broken packages.
root@GeoffNAS:/home/admin#
当我运行 apt-get Upgrade 时,我得到以下信息:
root@GeoffNAS:/home/admin# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
python-pkg-resources
Use 'apt autoremove' to remove it.
The following packages have been kept back:
python3-virtualenv
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up nfs-kernel-server (1:1.2.8-9+deb8u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
update-rc.d: error: initscript does not exist: /etc/init.d/nfs-kernel-server
dpkg: error processing package nfs-kernel-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
nfs-kernel-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@GeoffNAS:/home/admin#
知道如何通过修复 python3-virtualenv 来解决这个问题吗?我需要此功能才能让我的 Let's Encrypt 自动续订。
感谢您的帮助!
答案1
我有一个我信任的本地朋友,可以直接登录我的机器并查看。他能够解决这个问题,结果证明这是几件事情的结合。为了历史的缘故,我将总结他在这里的发现。
- 事实上,Netgear ReadyNAS OS6 与 Debian Jessie 相同,并且从 Jessie 存储库中提取
- 过去的某个时候,当 Netgear 推送更新时,我在修复另一个问题时不小心删除了一些 Debian 存储库
- 官方 Debian / Netgear / Jessie 存储库与第三方附加组件 (rnxtras) 添加的存储库之间也存在冲突,该附加组件似乎是从 Stretch 中提取的
我的朋友能够理清存储库,删除并重新安装损坏的软件包的正确版本,并将它们固定,这样它们将来就不会从错误的存储库中拉取。 Let's Encrypt 现在调用 Apt 不会出现错误,并正确更新证书。
谢谢你的帮助!