base_tutorial/8-ubuntu/حل مشکل.md
2025-04-09 10:48:22 +03:30

56 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div dir="rtl" align="right">
<p dir="rtl" align="center">بسم الله الرحمن الرحیم </p>
حل مشکل Temporary failure resolving هنگام آپدیت در Ubuntu
<div dir="ltr" align="left" style="background-color:black;color:white">
<p style="background-color:black;color:white;">
<code>
Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease Temporary failure resolving security.ubuntu.com
Err:2 http://archive.ubuntu.com/ubuntu xenial InRelease Temporary failure resolving archive.ubuntu.com
Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Temporary failure resolving archive.ubuntu.comReading package lists… DoneW: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving archive.ubuntu.com'W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving archive.ubuntu.com'W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving security.ubuntu.com'W: Some
index files failed to download.
They have been ignored, or old ones used instead
...
</code>
</p>
</div>
دستور زیر را در خط فرمان اجرا کنید:
<div dir="ltr" align="left">
```r
sudo nano /etc/resolv.conf
```
</div>
nameserver را تغییر دهید و یا کپی کنید:
<div dir="ltr" align="left">
```r
nameserver 8.8.8.8
nameserver 4.2.2.4
```
</div>
یا به طور خلاصه در یک خط:
<div dir="ltr" align="left">
```r
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
```
</div>
<p dir="rtl" align="center">صلوات</p>
</div>