国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Ubuntu sudo apt update 過程中遇到的報(bào)錯解決

這篇具有很好參考價值的文章主要介紹了Ubuntu sudo apt update 過程中遇到的報(bào)錯解決。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

參考資料

  • E: 倉庫 “https://mirrors.aliyun.com/docker-ce/linux/ubuntu kylin Release” 沒有 Release 文件。
  • sudo apt update:倉庫 “http://mirrors.aliyun.com/docker-ce/linux/debian ulyana Release” 沒有 Release 文件
  • Linux更換國內(nèi)源–解決終端下載速度慢的問題

1. 前言

在使用sudo apt update更新源時,發(fā)現(xiàn)報(bào)了一大堆錯。例如

E: 倉庫 “http://mirrors.aliyun.com/docker-ce/linux/debian ulyana Release” 沒有 Release 文件。
N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源。
W: 無法下載 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/dists/focal/InRelease  不能連接到 ppa.launchpad.net:http: W: 部分索引文件下載失敗。如果忽略它們,那將轉(zhuǎn)而使用舊的索引文件

起初我以為是源的問題,所以進(jìn)行了換源。換源的方式有以下兩種。

2. 換源方式

1. 方式1: 更換/etc/apt/sources.list文件里的源

  1. 備份源列表

    Linux配置的默認(rèn)源并不是國內(nèi)的服務(wù)器,下載更新軟件都比較慢。首先備份源列表文件sources.list

    sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup20221122 #備份源列表
    
  2. 修改源列表文件

    sudo gedit /etc/apt/sources.list # 打開sources.list文件
    

    編輯/etc/apt/sources.list文件, 在文件最前面添加鏡像源:

    • 阿里源
      #阿里源
      deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
      
    • 中科大源
      #中科大源
      deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
      deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
      deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
      deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
      deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
      deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
      deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
      deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
      deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
      deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
      
    • 清華源
      #清華源
      deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
      deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
      deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
      deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
      deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
      deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
      deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
      deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
      deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
      deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
      

    以上三種鏡像源選擇其中一個即可。

  3. 換源完成后更新即可。

    sudo apt-get update
    sudo apt-get upgrade
    

2. 方式2:在設(shè)置中software&updates(軟件和更新)里進(jìn)行換源

sudo apt update報(bào)錯,Ubuntu,ubuntu,linux,服務(wù)器
換源完成后更新即可。

sudo apt-get update
sudo apt-get upgrade

換成國內(nèi)源,可以使下載速度更快,但是,換源后有些錯誤依舊沒有解決,究其原因,這是因?yàn)?font color="red">以前添加的舊的ppa會導(dǎo)致很多問題,可能已經(jīng)不可用了,所以,需要把它們刪除或者注釋掉。

3. 問題解決–移除失效的ppa

  • 首先,終端執(zhí)行以下命令查看所有時效的ppa

    sudo apt-get update | grep "Failed"
    

    查找過程需要幾分鐘,需要耐心等待。

    我這邊時效的ppa有下面這個:

    E: 倉庫 “http://mirrors.aliyun.com/docker-ce/linux/debian ulyana Release” 沒有 Release 文件。
    
  • 接下來,進(jìn)入/etc/apt/sources.list.d目錄下,打開對應(yīng)ppa的.list文件,注釋掉里面的ppa

    例如,我這邊是docker-ce的ppa問題,所以,我打開的是docker.list文件。

    # 進(jìn)入目錄
    cd /etc/apt/sources.list.d  
    # 打開對應(yīng)的.list文件
    sudo gedit docker.list
    
  • 打開后,將里面的ppa用#號注釋掉(當(dāng)然,除了注釋掉,也可以直接把這個文件移除,這邊選擇了注釋的方式)。
    sudo apt update報(bào)錯,Ubuntu,ubuntu,linux,服務(wù)器

  • 最后,再次執(zhí)行sudo apt update,此時便不再報(bào)錯了。文章來源地址http://www.zghlxwxcb.cn/news/detail-787231.html

到了這里,關(guān)于Ubuntu sudo apt update 過程中遇到的報(bào)錯解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 解決Ubuntu軟件更新命令:sudo apt-get update的“N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源”錯誤并安裝gcc

    解決Ubuntu軟件更新命令:sudo apt-get update的“N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源”錯誤并安裝gcc

    使用快捷鍵:Ctrl+Alt+T打開終端進(jìn)入命令行 使用命令確認(rèn)Ubuntu版本: 鏡像源網(wǎng)址: https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/ 打開之后如圖所示,因?yàn)闆]有找到完全對應(yīng)的Ubuntu版本號,嘗試選擇了Ubuntu版本:22.10,親測可行 因?yàn)槌跏嫉腢buntu不自帶vim工具,所以這里用vi進(jìn)行編輯文件

    2024年01月19日
    瀏覽(20)
  • sudo apt-get update 失敗 的解決

    參考了:執(zhí)行sudo apt-get update失敗的解決方案 我的報(bào)錯情況如下(借用了別人的,我之前使用的Ubuntu默認(rèn)源,下面的報(bào)錯使用的清華源)。 Ubuntu的默認(rèn)源有時候也是有用的,因而不要刪除,Ubuntu20.04默認(rèn)源source.list文件內(nèi)容:ubuntu20.04 LTS系統(tǒng)默認(rèn)源source.list文件 我在Ubuntu 原 sour

    2024年02月09日
    瀏覽(18)
  • 【BUG解決】sudo apt-get update 報(bào)錯 E: The repository ‘http://xxx Release‘ does not have a Release file.

    【BUG解決】sudo apt-get update 報(bào)錯 E: The repository ‘http://xxx Release‘ does not have a Release file.

    前兩天在虛擬機(jī)Vmware中安裝了Ubuntu18.04操作系統(tǒng),因?yàn)樾枰惭b其他工具。所以想著執(zhí)行命令 更新一下系統(tǒng),以便進(jìn)行安裝。結(jié)果出現(xiàn) “E: The repository ‘http://xxx Release‘ does not have a Release file.” 以及 “E: Problem executing scripts APT::Update::Post-Invoke-Success \\\'if /usr/bin/test -w /var/cache

    2023年04月10日
    瀏覽(24)
  • 解決ubuntu新虛擬機(jī)下apt update報(bào)錯和git clone失敗的問題

    新的虛擬機(jī),安裝git發(fā)現(xiàn)apt不能正常使用,報(bào)錯如下 第一反應(yīng)是考慮到apt源配置可能有問題,用vi /etc/apt/source.list打開源發(fā)現(xiàn)沒有問題,用ping測試網(wǎng)絡(luò),ping百度報(bào)錯unkown host,ping 8.8.8.8可以通,應(yīng)該是域名解析錯誤,vi /etc/resolv.conf更改nameserver,輸入兩個8.8.8.8和8.8.4.4,然后

    2024年02月03日
    瀏覽(31)
  • 匯總利用YOLO8訓(xùn)練遇到的報(bào)錯和解決方案(包含訓(xùn)練過程中驗(yàn)證階段報(bào)錯、精度報(bào)錯、損失為Nan、不打印GFLOPs)

    匯總利用YOLO8訓(xùn)練遇到的報(bào)錯和解決方案(包含訓(xùn)練過程中驗(yàn)證階段報(bào)錯、精度報(bào)錯、損失為Nan、不打印GFLOPs)

    本文為專欄內(nèi)讀者和我個人在訓(xùn)練 YOLOv8時遇到的各種錯誤解決方案 ,你遇到的問題本文基本上都能夠解決,同時本文的內(nèi)容為持續(xù)更新,定期匯總大家遇到的問題已經(jīng)一些常見的問題答案,目前包含的問題已經(jīng)解決方法匯總?cè)缦聢D所示。 專欄目錄: YOLOv8改進(jìn)有效系列目錄

    2024年02月22日
    瀏覽(22)
  • 執(zhí)行命令:sudo apt-get update時出錯,倉庫xx不再含有/沒有Release文件,無法用該源更新【ubuntu21.04虛擬機(jī)】

    執(zhí)行命令:sudo apt-get update時出錯,倉庫xx不再含有/沒有Release文件,無法用該源更新【ubuntu21.04虛擬機(jī)】

    在新安裝 ubuntu虛擬機(jī) 后,使用 sudo apt-get update 命令時出現(xiàn) 倉庫xx不再含有/沒有Release文件,404 Not Found [IP: x.x.x.x],無法用該源更新錯誤 ,如下圖: 話不多說,直接上解決方案: https://mirrors.ustc.edu.cn/repogen/ 我的 ubuntu 是 21.04 版本,所以選擇21.04,選擇 Download 該命令是將該文

    2024年02月13日
    瀏覽(32)
  • Ubuntu之a(chǎn)pt-get--解決安裝docker的報(bào)錯:Package docker-ce is not available, but is referred to by another p

    原文網(wǎng)址:Ubuntu之a(chǎn)pt-get--解決安裝docker的報(bào)錯:Package docker-ce is not available, but is referred to by another p_IT利刃出鞘的博客-CSDN博客 本文介紹用Ubuntu的apt-get命令安裝docker時提示docker-ce不可用的解決方法。 Package docker-ce is not available, but is referred to by another package 此版本的源中沒有d

    2024年02月02日
    瀏覽(27)
  • 深入理解Linux中的“sudo apt-get update“命令

    在Linux操作系統(tǒng)中,sudo apt-get update 是一個常用的命令,用于更新系統(tǒng)中可用軟件包的信息。這個命令允許用戶獲取最新的軟件包列表和更新信息,以確保系統(tǒng)上的軟件保持最新狀態(tài)。在本文中,我們將詳細(xì)解釋sudo apt-get update命令的用法和工作原理。 目錄 1.什么是 \\\"sudo apt-g

    2024年02月05日
    瀏覽(23)
  • python 深度學(xué)習(xí) 解決遇到的報(bào)錯問題

    python 深度學(xué)習(xí) 解決遇到的報(bào)錯問題

    目錄 一、解決報(bào)錯ModuleNotFoundError: No module named ‘tensorflow.examples 二、解決報(bào)錯ModuleNotFoundError: No module named ‘tensorflow.contrib‘ 三、安裝onnx報(bào)錯assert CMAKE, ‘Could not find “cmake“ executable!‘ 四、ImportError: cannot import name \\\'builder\\\' from \\\'google.protobuf.internal\\\' 五、解決ModuleNotFoundError: N

    2024年02月08日
    瀏覽(19)
  • python 深度學(xué)習(xí) 解決遇到的報(bào)錯問題3

    python 深度學(xué)習(xí) 解決遇到的報(bào)錯問題3

    目錄 一、AttributeError: The vocab attribute was removed from KeyedVector in Gensim 4.0.0. 二、ImportError: cannot import name \\\'logsumexp\\\' 三、FutureWarning: Passing (type, 1) or \\\'1type\\\' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / \\\'(1,)type\\\' 四、ImportError: numpy.core.multiarray failed

    2024年02月10日
    瀏覽(27)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包