<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wsl on kenji.blog</title><link>http://kenji.blog/en/tags/wsl/</link><description>Recent content in Wsl on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Sun, 31 Mar 2024 16:57:33 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/wsl/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Fix "Temporary failure resolving..." Error in WSL</title><link>http://kenji.blog/en/p/wsl-%E3%81%A7temporary-failure-resolving%E3%81%A8%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AE%E5%AF%BE%E5%87%A6%E6%96%B9%E6%B3%95/</link><pubDate>Sun, 31 Mar 2024 16:57:33 +0900</pubDate><guid>http://kenji.blog/en/p/wsl-%E3%81%A7temporary-failure-resolving%E3%81%A8%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AE%E5%AF%BE%E5%87%A6%E6%96%B9%E6%B3%95/</guid><description>&lt;img src="http://kenji.blog/p/wsl-%E3%81%A7temporary-failure-resolving%E3%81%A8%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AE%E5%AF%BE%E5%87%A6%E6%96%B9%E6%B3%95/img.png" alt="Featured image of post How to Fix "Temporary failure resolving..." Error in WSL" />&lt;h1 id="how-to-fix-temporary-failure-resolving-error-in-wsl">How to Fix &amp;ldquo;Temporary failure resolving&amp;hellip;&amp;rdquo; Error in WSL
&lt;/h1>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">kenji@MyComputer:~$ sudo apt update
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">[sudo] password for kenji:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Temporary failure resolving &amp;#39;archive.ubuntu.com&amp;#39;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>When the above error appears in WSL, the DNS server settings might be incorrect.
In my environment, I solved it with the following steps.&lt;/p>
&lt;ol>
&lt;li>Start WSL.&lt;/li>
&lt;li>Run &lt;code>sudo nano /etc/resolv.conf&lt;/code>.&lt;/li>
&lt;li>Change the &lt;code>nameserver&lt;/code> line as follows:&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">nameserver 8.8.8.8
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ol start="4">
&lt;li>Save with &lt;code>Ctrl&lt;/code> + &lt;code>S&lt;/code> and exit with &lt;code>Ctrl&lt;/code> + &lt;code>X&lt;/code>.&lt;/li>
&lt;li>Run &lt;code>sudo apt update&lt;/code>.&lt;/li>
&lt;li>If the error doesn&amp;rsquo;t appear, it&amp;rsquo;s solved.&lt;/li>
&lt;/ol>
&lt;h2 id="if-the-above-steps-do-not-solve-the-issue">If the above steps do not solve the issue
&lt;/h2>&lt;p>It seems there are cases where the above steps don&amp;rsquo;t resolve the issue. Please refer to the following article:&lt;/p>
&lt;ul>
&lt;li>&lt;a class="link" href="https://qiita.com/ryosukeYamazaki/items/c04ec3ff78aac6eb8d26" target="_blank" rel="noopener"
>How to resolve &amp;lsquo;Temporary failure resolving ~&amp;rsquo; during apt update in WSL&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>