我在升级 ubuntu 后尝试安装 certbot。但是,我卡在了错误
您可能需要运行“apt --fix-broken install”来更正这些问题。以下软件包具有未满足的依赖关系:strongswan-starter:依赖:libstrongswan(= 5.5.1-1ubuntu3.2)但已安装 5.5.1-4ubuntu2.2 E:未满足的依赖关系。尝试不使用任何软件包执行“apt --fix-broken install”(或指定解决方案)。
我试过跑
apt --fix-broken install
但我得到的是
处理时遇到错误:
/var/cache/apt/archives/strongswan-starter_5.5.1-4ubuntu2.2_amd64.deb E: 子进程 /usr/bin/dpkg 返回错误代码 (1)
事实是我不想在系统中安装 strongswan 和任何相关软件包。但是当我尝试卸载它时,我得到了与我想升级它相同的错误。
有什么提示吗?
谢谢
我的sources.list
(有些被隐藏了)
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://hk.archive.ubuntu.com/ubuntu/ artful main restricted
# deb-src http://hk.archive.ubuntu.com/ubuntu/ yakkety main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://hk.archive.ubuntu.com/ubuntu/ artful-updates main restricted
# deb-src http://hk.archive.ubuntu.com/ubuntu/ yakkety-updates main restricted
运行 dpkg --list 可以找到更多信息
ii strongswan 5.5.1-1ubuntu3.2 all IPsec VPN solution metapackage
ii strongswan-charon 5.5.1-4ubuntu2.2 amd64 strongSwan Internet Key Exchange daemon
ii strongswan-libcharon 5.5.1-4ubuntu2.2 amd64 strongSwan charon library
ii strongswan-starter 5.5.1-1ubuntu3.2 amd64 strongSwan daemon starter and configuration file parser
运行后sudo apt remove libstrongswan
出现以下错误:-(
sudo apt remove libstrongswan
Reading package lists... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libcharon-standard-plugins : Depends: libstrongswan (= 5.5.1-4ubuntu2.2) but it is not going to be installed
libstrongswan-standard-plugins : Depends: libstrongswan (= 5.5.1-4ubuntu2.2) but it is not going to be installed
strongswan-libcharon : Depends: libstrongswan (= 5.5.1-4ubuntu2.2) but it is not going to be installed
strongswan-starter : Depends: libstrongswan (= 5.5.1-1ubuntu3.2) but it is not going to be installed
我试图在命令中运行 dpkg -P strongswan-*,但是 strongswan-libcharon 和 strongswan-starter 仍然出现错误。
这是日志
dpkg -P strongswan-starter
(Reading database ... 148684 files and directories currently installed.)
Removing strongswan-starter (5.5.1-1ubuntu3.2) ...
Failed to stop strongswan.service: Unit strongswan.service not loaded.
Failed to stop strongswan.service: Unit strongswan.service not loaded.
dpkg: error processing package strongswan-starter (--purge):
subprocess installed pre-removal script returned error exit status 5
/usr/bin/deb-systemd-helper: error: unable to read strongswan.service
Failed to get unit file state for strongswan.service: No such file or directory
strongswan.service is a disabled or a static unit, not starting it.
/usr/bin/deb-systemd-helper: error: unable to read strongswan.service
Failed to get unit file state for strongswan.service: No such file or directory
strongswan.service is a disabled or a static unit, not starting it.
Errors were encountered while processing:
strongswan-starter