解決ubuntu20下執行命令顯示Failed to fetch問題
我是在安裝vim命令時報了這個錯,具體一點大概是這樣
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/v/vim/vim_8.1.2269-1ubuntu5_amd64.deb Connection failed
然後我大概研究了一下,具體好像是dns解析問題,或者也可以說是網不好,連線斷了連不上啥的。
解決的話就是改配置nameserver,挺簡單的。
輸入命令: (當然了,如果你是root使用者就不需要輸入sudo了)
sudo vi /etc/resolv.conf
但是很尷尬vi命令編輯檔案很不方便不能刪除
此時我們可以在外部選擇刪除第幾行,具體命令如下:
sed -i '17d' /etc/resolv.conf
這裡的 '17d’代表是第17行,因為我servername在第17行,你可以先進去輸命令 :set nu 看看具體在第幾行在刪除,不過不管你是第幾行,這段命令17後面的d是不能刪除的 例如: '20d’
進入之後把servername 改成 servername 8.8.8.8,改成之後是這樣的
相關推薦
解決ubuntu20下執行命令顯示Failed to fetch問題
我是在安裝vim命令時報了這個錯,具體一點大概是這樣 E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/v/vim/vim_8.1.2269-1ubuntu5_amd64.debConnection failed
jupyter notebook執行命令顯示[*](解決辦法)
看下文章前我想先說一個問題 遇到問題不要盲目的搜尋答案,先看看終端提示什麼錯誤,下面我總結一下會出現jupyter notebook執行命令,一直顯示in[*]這種情況的解決辦法:
解決subprocess.Popen在windows下執行命令報的KeyError: 'PATH'問題
最近接到一個使用python寫一個解析yaml檔案,並根據內容配置指定對應的shell來執行(比如bat、powershell、bash、csh、zsh等)命令的功能,於是考慮使用subprocess.Popen模組來實現執行命令相關的功能,subprocess.P
kubernetes:關於建立pod中結點始終處於creating狀態的問題解決(Error syncing pod, skipping: failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed for registry.access.redhat.com
通過以下程式碼獲得certificates,注意,必須對於master結點和兩個node結點機器上都需要獲取
解決SSH遠端執行命令找不到環境變數的問題
通過SSH執行遠端主機的命令或指令碼時,經常會出現找不到自定義環境變數的問題。但是,如果通過SSH登入遠端主機,然後再執行相同的命令或指令碼,那麼此時執行又是成功的。兩種相似的方法,得到的結果卻截然不同,看
解決vue安裝less報錯Failed to compile with 1 errors的問題
1、建立vue專案後安裝less,執行 npm install less less-loader --save-dev 下載版本為:[email protected] , [email protected],重啟服務報錯,報錯資訊如下:
【分享】檢查build.log, 解決petalinux的編譯錯誤“ERROR: Failed to create workspace directory”
修改PetaLinux工程的配置檔案project-spec/meta-user/conf/petalinuxbsp.conf後,編譯出現下列錯誤,報告“ERROR: Failed to create workspace directory”。
Scala+Maven 打包的 jar 包 執行出現:Failed to load class XXX.
技術標籤:筆記mavenscalaspark 問題:Failed to load class XXX. 檢查pom.xml是否有如下內容:
Bash執行命令顯示進度和結果
技術標籤:linuxlinuxbash 文章目錄 Bash執行命令顯示進度和結果1.程式碼2.測試效果
linux下執行命令後,結果輸出如何實現列對齊?
技術標籤:Linuxlinux列表shell 問題描述:我們在linux下執行命令時,比如netstat -i,輸出列表每列錯亂,如何實現輸出結果列表能列對齊? 解決方案:使用column命令 如下:
centos下git報錯Failed to connect to repository : Command "git ls-remote -h HEAD" returned status code 128:
Failed to connect to repository : Command \"git ls-remote -h HEAD\" returned status code 128:stdout: stderr: fatal: repository \'http://ytgit.chinasoft.cn/chinasoft/innerapi.git/\' not found# 通過在g
Sentinel部署報錯Failed to fetch metric 問題解決
前言:使用docker部署的微服務在連線sentinel一直顯示連線超時,錯誤如下 Failed to fetch metric from <http://42.192.139.**:3002/metric?startTime=1647926670000&endTime=1647926676000&refetch=fal
E: Failed to fetch http://ppa.launchpad.net/jonathonf/python-3.6/...
技術標籤:問題ubuntupython 在進行apt-get update時報瞭如下錯誤 原因是因為無效的安裝源導致了403錯誤
Temporary failure in name resolution域名解析錯誤Failed to fetch...導致Ubuntu無法更新(WSL2)
技術標籤:WSL系統Ubuntuubuntulinux sudo apt-get update sudo apt-get upgrade #錯誤 錯誤:Failed to fetch... Temporary failure in name resolution
ubuntu16.04 apt-get update 報錯E: Failed to fetch http://ppa.launchpad.net/deb-rob/ros-trusty/ubuntu/
問題描述: sudo apt-get update 報錯: W: The repository \'http://ppa.launchpad.net/deb-rob/ros-trusty/ubuntu xenial Release\' does not have a Release file. N: Data from such a repository can\'t be au
命令列執行python顯示no module named xxx的解決方案
1. 問題 在pycharm裡面編寫python程式碼,引用了自己的模組。在pycharm裡面沒顯示異常,但在終端(命令列)執行時顯示no module named xxx(引用的自己的模組)
Java學習-068-Springboot 解決 maven 資源過濾導致的網頁按鈕圖示顯示異常( Failed to decode downloaded font )
使用 Springboot + layui 進行網頁開發時,頁面圖示顯示異常,如下圖所示。 遇到此問題後,解決的步驟如下所示:
kafka API執行報錯javaapi Failed to send messages after 3 tries【已解決】
技術標籤:javakafkazookeeperkafkabug 任何kafkaAPI 都執行報錯,找了兩天的問題 public static void main(String[] args) {
執行程式報錯:SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".解決方案
報錯內容: SLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\". SLF4J: Defaulting to no-operation (NOP) logger implementation
解決matplotlib在MAC系統下中文字型顯示問題報錯:Font family [‘sans-serif‘] not found.Falling back to DejaVu Sans.
報錯 findfont: Font family [u\'sans-serif\']notfound. Falling back to Bitstream Vera Sans 這是因為matplotlib 是沒有中文字型的,需要我們手動安裝在網上搜索瞭解到基本上大家都是在安裝matplotlib後才會遇到