当我尝试在 Ubuntu 14.10 上安装 Cloudstack 时,我安装了 openntpd。我不再需要 openntpd,但现在无法卸载它。我试过了sudo apt-get
autoremove
,purge
但总是出现以下错误:
deepal@Deepal-ASUS:~$ sudo apt-get autoremove openntpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
openntpd
0 upgraded, 0 newly installed, 1 to remove and 55 not upgraded.
1 not fully installed or removed.
After this operation, 198 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 332328 files and directories currently installed.)
Removing openntpd (20080406p-8) ...
/usr/bin/deb-systemd-helper: error: unable to link /etc/systemd/system/openntpd.service to /dev/null: File exists
dpkg: error processing package openntpd (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
openntpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
现在我无法卸载其他几个软件包,因为 openntpd 似乎是一个依赖项,但无法卸载。有人能帮我解决这个烦人的问题吗?
谢谢。
答案1
尝试移动此文件以便删除后脚本能够正常运行。
mv /etc/systemd/system/openntpd.service /tmp/