Temporary failure resolving ‘archive.ubuntu.com‘
總結原因主要有以下幾種:
最終生效版本:
- linux版本docker 配置/etc/docker/daemon.json檔案的DNS屬性
touch daemon.json
{
"dns": ["8.8.8.8", "114.114.114.114"]
}
然後重啟docker即可,問題完美解決,可以正常構建映象。
sudo service docker restart
1. dns沒有配置,解決辦法 加入dns伺服器地址:
vi /etc/resolv.conf
新增下面的資訊
nameserver 202.96.134.133
nameserver 8.8.8.8
然後重啟
sudo vi /etc/resolv.conf
重啟網路卡
systemctl restart network
或 service network restart
重啟網路卡失敗。
linux使用這個:service network-manager restart
實際上,我的重啟之後,這個配置會進行恢復,相當於沒有生效。
網上的解決方法,有的說是解除安裝檔案之後恢復不了,然後我沒有嘗試。
直接解除安裝掉開機重寫該檔案的 resolvconf。 執行命令:sudo apt-get autoremove resolvconf
如果仍需要使用 resolvconf ,則可在解除安裝後,對 /etc/resolv.conf 加鎖後再重新安裝該軟體,這樣
resolvconf 就不會在開機時重寫該檔案。
2. 另一個說法:
選擇修改/etc/resolvconf/resolv.conf.d/base檔案
我的是20版本的Ubuntu 並沒有這個檔案。繼續看別的
3、源的問題,換成國內下載源
有的沒有連上網導致下載失敗,可以嘗試這個辦法
有的下載速度很慢導致失敗,可以嘗試換源
相關文章
- Resolving archive.cloudera.com... failed: Temporary failure in nameHiveCloudAI
- Resolving failed: Temporary failure in name resolution 錯誤解決方法AI
- [virtualbox] temporary failure in name resolutionAI
- name server cannot be used, reason: Temporary failure in name resolutionServerAI
- IP address could not be resolved: Temporary failure in name resolutionAI
- 【MySQL】ERROR 1878 (HY000): Temporary file write failure.MySqlErrorAI
- Temporary failure in name resolution - DNS引發的問題和思考AIDNS
- MySQL could not be resolved: Temporary failure in name resolution報錯解決方法MySqlAI
- Allocation of Temporary Segments for Temporary Tables and Indexes (28)Index
- 練習使用list failure,advise failure; repair failure;AI
- Failure is not fatal, but failure to change might be.AI
- oracle temporary tableOracle
- design for failureAI
- [Oracle Script] Temporary Sort UsageOracle
- Restrictions on Altering Temporary TablesREST
- Operations that Require Temporary Segments (26)UI
- Assertion failure 錯誤AI
- Ext success failure 呼叫AI
- Temporary tablespaces in RAC ? Oracle databas...Oracle
- 資料庫表--temporary table資料庫
- Rust Reference Cycles: Resolving and Avoiding themRust
- DRIVER_POWER_STATE_FAILUREAI
- Vagrant:NS_ERROR_FAILUREErrorAI
- Assertion failure in -[UICollectionViewData validateLayoutInRect:]AIUIView
- Oracle臨時表GLOBAL TEMPORARY TABLEOracle
- Oracle Temporary Tables(Oracle 臨時表)Oracle
- oracle的兩種global temporary table!Oracle
- Expert Tips on Drop Temporary Tablespace Hangs!!
- Resolving Issues Where 'Row Cache Lock' Waits are OccurringAI
- Error: Debug Failure at typeToStringErrorAI
- Preferred Read Failure GroupsAI
- [Linux] kernel: page allocation failureLinuxAI
- ftp_rawlist: Unable to create temporary file.FTP
- Sybase IQ 錯誤 : Temporary space limit exceededMIT
- 全域性臨時表 GLOBAL TEMPORARY TABLE
- dba_segments之segment_type='TEMPORARY'
- ORA-29516: Aurora assertion failure: Assertion failure at joez.c:3311AI
- ASM Failure Group的一點理解ASMAI