apt-key is deprecated

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
OpenVpn Newbie
Posts: 1
Joined: Mon Feb 15, 2021 6:23 pm

apt-key is deprecated

Post by algospark » Mon Feb 15, 2021 7:07 pm

Please can someone help? I'm looking to download openvpn for linux. Using Kali and know that it is preinstalled but learning from a site for a cert uses in-house labs with openvpn. The download link for the openvpn in this lab presents a file that only shows up as a text file and will not start as a form of working software so i come on this site to download and ensure i have the right tools to work the openvpn and find some instructions to enable as follows:

The first instruction given says to ensure that your apt supports the https transport by typing the command:
''apt install apt-transport-https''

but the terminal returns:
''E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?''

The next instruction works and have managed to save the key with the following result:

wget https://swupdate.openvpn.net/repos/open ... kg-key.pub
--2021-02-15 17:38:08-- https://swupdate.openvpn.net/repos/open ... kg-key.pub
Resolving swupdate.openvpn.net (swupdate.openvpn.net)...,
Connecting to swupdate.openvpn.net (swupdate.openvpn.net)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3165 (3.1K) [binary/octet-stream]
Saving to: ‘openvpn-repo-pkg-key.pub’

openvpn-repo-pkg-k 100%[===============>] 3.09K --.-KB/s in 0s

2021-02-15 17:38:09 (7.26 MB/s) - ‘openvpn-repo-pkg-key.pub’ saved [3165/3165]

However the next instruction which is:
apt-key add openvpn-repo-pkg-key.pub

gives the following result:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
E: This command can only be used by root.

Can someone advise?

Post Reply