sudo add-apt-key: command not found - Deepin 16.4

16,257

It's apt-key add - apt-key the command and add the subcommand/option (you might be confusing it with add-apt-repository). This is for adding a key from a file. If you want to fetch a key and add it, you need apt-key adv --recv-key:

adv
   Pass advanced options to gpg. With adv --recv-key you can e.g.
   download key from keyservers directly into the the trusted set of
   keys. Note that there are no checks performed, so it is easy to
   completely undermine the apt-secure(8) infrastructure if used
   without care.
Share:
16,257

Related videos on Youtube

Jamie Hutber
Author by

Jamie Hutber

Updated on September 18, 2022

Comments

  • Jamie Hutber
    Jamie Hutber over 1 year

    I am trying to manually add keys as for some reason i an unable.

    How could I be able to add a key manually without using add-apt-key

    hutber@hutber-PC:~$ sudo apt-get install software-properties-common
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    software-properties-common is already the newest version (0.96.20.2-1).
    The following package was automatically installed and is no longer required:
      libnpth0:i386
    Use 'sudo apt autoremove' to remove it.
    0 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.
    hutber@hutber-PC:~$ sudo add-apt-key 073E051D7B2AEE37
    sudo: add-apt-key: command not found