OpenVPN 卸载不当

OpenVPN 卸载不当

我在 Ubuntu 18.04 机器上安装了 OpenVPN,后来尝试卸载。现在,每当我尝试安装任何东西或做任何事情时,apt-get我都会收到错误,并且软件包无法安装。当我尝试安装某些东西时,会发生以下情况:

    Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  openvpn
The following NEW packages will be installed:
  yarn
0 upgraded, 1 newly installed, 1 to remove and 100 not upgraded.
1 not fully installed or removed.
Need to get 0 B/833 kB of archives.
After this operation, 3,849 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 183666 files and directories currently installed.)
Removing openvpn (2.4.4-2ubuntu1.1) ...
dpkg: error processing package openvpn (--remove):
 unable to securely remove '/etc/openvpn/server': Not a directory
Errors were encountered while processing:
 openvpn
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

我可以通过创建一个名为的文件/etc/openvpn而不是文件夹来重现您的问题。

尝试删除无效的文件/文件夹/etc/openvpn

sudo rm -rfv /etc/openvpn

然后删除openvpn包:

sudo apt purge -y openvpn

相关内容