AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / ubuntu / Perguntas / 1398344
Accepted
matigo
matigo
Asked: 2022-03-20 14:45:57 +0800 CST2022-03-20 14:45:57 +0800 CST 2022-03-20 14:45:57 +0800 CST

aviso de depreciação apt-key ao atualizar o sistema

  • 772

Recentemente, notei alguns problemas ao executar aptonde o sistema me avisará sobre uma depreciação do chaveiro:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: https://packages.microsoft.com/repos/edge/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Isso não me impede de realizar a atualização, mas prefiro não ver isso ao atualizar meu sistema. Como devemos armazenar chaves GPG confiáveis ​​daqui para frente?

apt
  • 5 5 respostas
  • 71330 Views

5 respostas

  • Voted
  1. Best Answer
    matigo
    2022-03-20T14:53:42+08:002022-03-20T14:53:42+08:00

    Uma maneira de resolver isso é exportar a chave GPG do chaveiro obsoleto e armazená-la no formato /usr/share/keyrings. Felizmente, não é muito difícil:

    1. Open Terminal (se ainda não estiver aberto)

    2. Liste as chaves existentes:

      $ sudo apt-key list
      Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
      /etc/apt/trusted.gpg
      --------------------
      pub   rsa4096 2017-05-08 [SCEA]
            1EDD E2CD FC02 5D17 F6DA  9EC0 ADAE 6AD2 8A8F 901A
      uid           [ unknown] Sublime HQ Pty Ltd <[email protected]>
      sub   rsa4096 2017-05-08 [S]
      
      pub   rsa2048 2015-10-28 [SC]
            BC52 8686 B50D 79E3 39D3  721C EB3E 94AD BE12 29CF
      uid           [ unknown] Microsoft (Release signing) <[email protected]>
      
    3. A partir daqui, podemos exportar uma chave:

      sudo apt-key export BE1229CF | sudo gpg --dearmour -o /usr/share/keyrings/microsoft.gpg
      

      Nota: O BE1229CFvalor vem dos últimos 8 caracteres do pubcódigo.

      A seguinte mensagem provavelmente aparecerá:

      Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
      
    4. Agora podemos atualizar nosso arquivo fonte apt para o repositório (por exemplo, /etc/apt/sources.list.d/microsoft.list), adicionando uma signed-bytag:

      deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge/ stable main
      
    5. Atualize aptpara confirmar que a mensagem desapareceu:

      sudo apt update
      ...
      Reading package lists... Done
      Building dependency tree... Done
      Reading state information... Done
      All packages are up-to-date.
      W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
      
    6. Remova a assinatura original:

      sudo apt-key del BE1229CF
      

    Isso pode ser feito com cada uma das mensagens de aviso. Uma vez feito, aptnão vai mais reclamar.

    • 108
  2. Mahmoud
    2022-05-14T22:51:43+08:002022-05-14T22:51:43+08:00

    tente isso

    cd /etc/apt
    sudo cp trusted.gpg trusted.gpg.d
    
    • 38
  3. heynnema
    2022-05-23T05:58:45+08:002022-05-23T05:58:45+08:00

    A maneira fácil de corrigir essas mensagens de aviso geradas por sudo apt update...

    W: https://linux.teamviewer.com/deb/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: http://apt.keepsolid.com/ubuntu/dists/groovy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: http://linux.dropbox.com/ubuntu/dists/disco/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: http://download.virtualbox.org/virtualbox/debian/dists/hirsute/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: http://download.opensuse.org/repositories/home:/IBBoard:/cawbird/xUbuntu_22.04/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: http://ppa.launchpad.net/solaar-unifying/stable/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    

    Nota : Essas mensagens de aviso podem ser geradas por qualquer repositório ou ppa ativadoSoftware & Updates na guia "Outro software".

    Correção de exemplo:


    Para esta mensagem de aviso com sudo apt update...

    W: http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    

    Procuramos sudo apt-key liste encontramos esta entrada para xbmc ...

    pub   rsa1024 2009-01-20 [SC]
          1897 01DA 570C 56B9 488E  F60A 6D97 5C47 91E7 EE5E
    uid           [ unknown] Launchpad PPA for XBMC for Linux
    

    Então convertemos esta entrada para um arquivo .gpg, usando os últimos 8 caracteres numéricos acima...

    sudo apt-key export 91E7EE5E | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/team-xbmc.gpg
    

    Repita os comandos acima para cada mensagem de aviso gerada pelo sudo apt update.

    Nota : Parcialmente retirado das respostas aceitas aqui e aqui .

    • 14
  4. DiRaOL
    2022-06-08T14:03:17+08:002022-06-08T14:03:17+08:00

    Considerando todas as boas sugestões fornecidas, criei um auxiliar oneliner para automatizar o processo para todas as chaves:

    sudo apt-key list 2>&1 | grep -E '(trusted.gpg.d)' -A 3 | grep -v '^\-\-' | grep -v '^pub ' | sed 's@.*/trusted.gpg.d/\(.*\)@\1@g' | awk 'NR%2{printf "%s ",$0;next;}1' | awk '{print "sudo apt-key export "$10$11" | sudo gpg --dearmour -o /usr/share/keyrings/"$1}' | xargs -I{} eval("{}")
    
    • 2
  5. Zidan Rahmandani
    2022-05-27T07:19:03+08:002022-05-27T07:19:03+08:00

    Eu resolvi isso com alguns comandos como abaixo.

    wget https://apt.metasploit.com/metasploit-framework.gpg.key
    gpg --no-default-keyring --keyring ./metasploit-framework_keyring.gpg --import metasploit-framework.gpg.key
    gpg --no-default-keyring --keyring ./metasploit-framework_keyring.gpg --export > ./metasploit-framework.gpg
    sudo mv ./metasploit-framework.gpg /etc/apt/trusted.gpg.d/
    apt update
    

    Resolvido, a chave é armazenada no chaveiro legado trusted.gpg (/etc/apt/trusted.gpg) na instalação do metasploit

    • 0

relate perguntas

  • Como posso ver todas as versões de um pacote que estão disponíveis no arquivo?

  • Como os PPAs podem ser removidos?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve