尝试运行“apt-get 更新 -y“我一直收到某种错误,任何帮助都将不胜感激。提前谢谢您!
root@ubuntu:~# cat /etc/issue
Ubuntu 18.04.5 LTS \n \l
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
root@ubuntu:~# uname -a
Linux ubuntu 3.10.105 #25426 SMP Wed Jul 8 03:19:33 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:~# apt-key list
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2011-08-03 [SC] [expires: 2025-07-27]
30EB F4E7 3CCE 63EE E124 DD27 8E6D A8B4 E158 C569
uid [ unknown] Samuli Seppänen (OpenVPN Technologies, Inc) <[email protected]>
sub rsa2048 2011-08-03 [E] [expires: 2025-07-27]
/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg
------------------------------------------------------
pub rsa4096 2012-05-11 [SC]
790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32
uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <[email protected]>
/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
pub rsa4096 2012-05-11 [SC]
8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092
uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>
/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg
------------------------------------------------------
pub rsa4096 2018-09-17 [SC]
F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C
uid [ unknown] Ubuntu Archive Automatic Signing Key (2018) <[email protected]>
root@ubuntu:~# cat /etc/apt/sources.list.d/openvpn-aptrepo.list
deb http://build.openvpn.net/debian/openvpn/stable bionic main
root@ubuntu:/# openvpn --version
OpenVPN 2.4.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Oct 30 2019
library versions: OpenSSL 1.1.1 11 Sep 2018, LZO 2.08
Originally developed by James Yonan
Copyright (C) 2002-2018 OpenVPN Inc <[email protected]>
Compile time defines: enable_async_push=no enable_comp_stub=no enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dependency_tracking=no enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=needless enable_fragment=yes enable_iproute2=yes enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_maintainer_mode=no enable_management=yes enable_multihome=yes enable_pam_dlopen=no enable_pedantic=no enable_pf=yes enable_pkcs11=yes enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_silent_rules=no enable_small=no enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=yes enable_werror=no enable_win32_dll=yes enable_x509_alt_username=yes with_aix_soname=aix with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_sysroot=no
root@ubuntu:/# apt-get -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
openvpn is already the newest version (2.4.9-bionic0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up openvpn (2.4.9-bionic0) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of cond-restart.
/var/lib/dpkg/info/openvpn.postinst: 63: /var/lib/dpkg/info/openvpn.postinst: file: not found
dpkg: error processing package openvpn (--configure):
installed openvpn package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
openvpn
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@ubuntu:~#
答案1
你似乎在发明一个并不存在的问题。
openvpn
以下是Ubuntu 每个版本的当前版本:
$ rmadison openvpn
openvpn | 2.2.1-8ubuntu1 | precise | source, amd64, armel, armhf, i386, powerpc
openvpn | 2.2.1-8ubuntu1.4 | precise-security | source, amd64, armel, armhf, i386, powerpc
openvpn | 2.2.1-8ubuntu1.4 | precise-updates | source, amd64, armel, armhf, i386, powerpc
openvpn | 2.3.2-7ubuntu3 | trusty | source, amd64, arm64, armhf, i386, powerpc, ppc64el
openvpn | 2.3.2-7ubuntu3.2 | trusty-security | source, amd64, arm64, armhf, i386, powerpc, ppc64el
openvpn | 2.3.2-7ubuntu3.2 | trusty-updates | source, amd64, arm64, armhf, i386, powerpc, ppc64el
openvpn | 2.3.10-1ubuntu2 | xenial | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
openvpn | 2.3.10-1ubuntu2.1 | xenial-security | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
openvpn | 2.3.10-1ubuntu2.2 | xenial-updates | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
openvpn | 2.4.4-2ubuntu1 | bionic | source, amd64, arm64, armhf, i386, ppc64el, s390x
openvpn | 2.4.4-2ubuntu1.3 | bionic-updates | source, amd64, arm64, armhf, i386, ppc64el, s390x
openvpn | 2.4.4-2ubuntu1.4 | bionic-proposed | source, amd64, arm64, armhf, i386, ppc64el, s390x
openvpn | 2.4.7-1ubuntu2 | focal | source, amd64, arm64, armhf, ppc64el, riscv64, s390x
openvpn | 2.4.7-1ubuntu2.20.04.1 | focal-proposed | source, amd64, arm64, armhf, ppc64el, riscv64, s390x
openvpn | 2.4.9-3ubuntu1 | groovy | source, amd64, arm64, armhf, ppc64el, riscv64, s390x
请注意,旧版本不会有新版本。要使用新软件,请使用较新版本的 Ubuntu。
- 旧版本确实获得了安全补丁;旧版本可以安全使用。
接下来,让我们看看 Debian 的上游,看看最近的 OpenVPN 上传:
[2020-08-16] 接受 openvpn 2.5~beta1-3 (源代码) 进入实验阶段
这意味着 Debian 志愿者已打包 OpenVPN 2.5,并将其上传到 Debian 进行测试。这些新上传的软件包将出现在 Ubuntu 的未来版本中...
...但可能不是 20.10。Debian 20.10 导入冻结是2020年8月27日。测试不太可能这么快完成。