<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ubuntu on 我的博客</title><link>https://hugo.kkun.top/categories/ubuntu/</link><description>Recent content from 我的博客</description><generator>Hugo</generator><language>zh-cn</language><managingEditor>your@email.com (你的名字)</managingEditor><webMaster>your@email.com (你的名字)</webMaster><copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright><lastBuildDate>Thu, 24 Aug 2023 08:03:51 +0000</lastBuildDate><atom:link href="https://hugo.kkun.top/categories/ubuntu/index.xml" rel="self" type="application/rss+xml"/><item><title>Ubuntu apt源密钥不可用解决方案</title><link>https://hugo.kkun.top/post/ubuntu-apt%E6%BA%90%E5%AF%86%E9%92%A5%E4%B8%8D%E5%8F%AF%E7%94%A8%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88/</link><pubDate>Thu, 24 Aug 2023 08:03:51 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/ubuntu-apt%E6%BA%90%E5%AF%86%E9%92%A5%E4%B8%8D%E5%8F%AF%E7%94%A8%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88/</guid><description>
<![CDATA[<h1>Ubuntu apt源密钥不可用解决方案</h1><p>作者：你的名字（your@email.com）</p>
        
          <h2 id="现象">
<a class="header-anchor" href="#%e7%8e%b0%e8%b1%a1"></a>
现象
</h2><ul>
<li>报错如下</li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">The following signatures couldn<span class="err">&#39;</span>t be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E
</span></span></code></pre></div><ul>
<li>apt update报错</li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">W: GPG error: https://repos.influxdata.com/ubuntu focal InRelease: The following signatures couldn<span class="s1">&#39;t be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E
</span></span></span><span class="line"><span class="cl"><span class="s1">E: The repository &#39;</span>https://repos.influxdata.com/ubuntu focal InRelease<span class="s1">&#39; is not signed.
</span></span></span><span class="line"><span class="cl"><span class="s1">N: Updating from such a repository can&#39;</span>t be <span class="k">done</span> securely, and is therefore disabled by default.
</span></span><span class="line"><span class="cl">N: See apt-secure<span class="o">(</span>8<span class="o">)</span> manpage <span class="k">for</span> repository creation and user configuration details.
</span></span></code></pre></div><h2 id="解决方案">
<a class="header-anchor" href="#%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88"></a>
解决方案
</h2><h3 id="重新获取公钥">
<a class="header-anchor" href="#%e9%87%8d%e6%96%b0%e8%8e%b7%e5%8f%96%e5%85%ac%e9%92%a5"></a>
重新获取公钥
</h3><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo gpg --keyserver keyserver.ubuntu.com --recv-keys D8FF8E1F7DF8B07E
</span></span></code></pre></div><h3 id="导出公钥并加入apt信任密钥">
<a class="header-anchor" href="#%e5%af%bc%e5%87%ba%e5%85%ac%e9%92%a5%e5%b9%b6%e5%8a%a0%e5%85%a5apt%e4%bf%a1%e4%bb%bb%e5%af%86%e9%92%a5"></a>
导出公钥并加入apt信任密钥
</h3><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo gpg --export --armor 467B942D3A79BD29 <span class="p">|</span> sudo apt-key add -
</span></span></code></pre></div><p><code>apt update</code> 不再报错</p>
        
        <hr><p>本文2023-08-24首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-08-24</p>]]></description><category>Linux</category><category>Ubuntu</category></item></channel></rss>