ubuntu docker相关错误记录
<ol><li>
<h4 id="添加-docker-官方-gpg-key">添加 docker 官方 GPG key</h4>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">curl -fsSL https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">download.docker.com/linux/ubuntu/gpg | sudo apt-key add -</span></pre>
</div>
<p>报错:</p>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">gpg: can<span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">t connect to the agent: IPC connect call failed</span></pre>
</div>
<p>解决方法:</p>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;"><span style="color: rgba(0, 0, 0, 1)">apt remove gpg
apt </span><span style="color: rgba(0, 0, 255, 1)">install</span> gnupg1</pre>
</div>
</li>
<li>
<h4> 设置 docker 稳定版仓库</h4>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;"><span style="color: rgba(0, 0, 255, 1)">sudo</span> add-apt-repository <span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable</span><span style="color: rgba(128, 0, 0, 1)">"</span></pre>
</div>
<p>报错:</p>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">add-apt-repository command not found</pre>
</div>
<p>解决方法:</p>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">apt-get <span style="color: rgba(0, 0, 255, 1)">install</span> software-properties-common</pre>
</div>
</li>
<li>
<h4 id="设置完毕仓库,重新更新源">更新源</h4>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">sudo apt-get update
</pre>
</div>
<p>报错:</p>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">Hit:<span style="color: rgba(128, 0, 128, 1)">1</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease</span>
Hit:<span style="color: rgba(128, 0, 128, 1)">2</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease</span>
Hit:<span style="color: rgba(128, 0, 128, 1)">3</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease</span>
Hit:<span style="color: rgba(128, 0, 128, 1)">4</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">5</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">download.docker.com/linux/ubuntu focal InRelease</span>
Err:<span style="color: rgba(128, 0, 128, 1)">6</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">download.docker.com/linux/ubuntu focal Release</span>
<span style="color: rgba(128, 0, 128, 1)">404</span>Not Found
Reading package lists... Done
E: The repository </span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">https://download.docker.com/linux/ubuntu focal Release</span><span style="color: rgba(128, 0, 0, 1)">'</span> does not have a Release <span style="color: rgba(0, 0, 255, 1)">file</span><span style="color: rgba(0, 0, 0, 1)">.
N: Updating from such a repository can</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">t be done securely, and is therefore disabled by default.</span>
N: See apt-secure(<span style="color: rgba(128, 0, 128, 1)">8</span>) manpage <span style="color: rgba(0, 0, 255, 1)">for</span> repository creation and user configuration details.</pre>
</div>
<h4>解决方法:在 /etc/apt/source.list 文件中增加如下配置</h4>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">deb https://download.docker.com/linux/ubuntu bionic stable
</pre>
</div>
<p>再次更新源</p>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">sudo apt-get update
</pre>
</div>
<p>报错:</p>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
Ign:5 https://download.docker.com/linux/ubuntu focal InRelease
Get:6 https://download.docker.com/linux/ubuntu bionic InRelease
Err:7 https://download.docker.com/linux/ubuntu focal Release
404Not Found
Get:8 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
</pre>
</div>
<h4>解决方法:删除 /etc/apt/source.list </h4>
<div class="cnblogs_Highlighter">
<pre class="brush:bash;gutter:true;">https://download.docker.com/linux/ubuntu focal Release
</pre>
</div>
<p> </p>
</li>
</ol><br><br>
来源:https://www.cnblogs.com/dreamydeng/p/12889892.html
頁:
[1]