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

嵌入式LINUX開發(fā)系列之ARM板子如何替換debian鏡像源

這篇具有很好參考價值的文章主要介紹了嵌入式LINUX開發(fā)系列之ARM板子如何替換debian鏡像源。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

LINUX系列文章目錄

第一章 ARM板子如何替換debian鏡像源


前言

當(dāng)你做嵌入式開發(fā)過程中拿到一個開發(fā)板,遇到apt update,發(fā)現(xiàn)無法成功,鏡像源無法使用,這樣的話大大增加了開發(fā)難度。最近一個項目遇到這個問題,搜尋網(wǎng)絡(luò)卻無法得到有效答案,本人作為一名嵌入式開發(fā)工程師,在這里總結(jié)了一下,希望對大家做開發(fā)有所幫助,共同進(jìn)步,這是我的第一篇文章,都是干貨,希望大家多多支持,點點關(guān)注訂閱,持續(xù)更新,致力于有效解決我們項目開發(fā)過程中遇到問題。


一、鏡像源是什么?

下面先普及一下概念(此部分來源于網(wǎng)絡(luò))

  1. 源: 源就是來源,就是你安裝軟件時,程序從哪里獲取軟件包(安裝程序在你的機器上,但需要安裝的東西在軟件源服務(wù)器上)。
  2. 鏡像:鏡像原意是光學(xué)里指的物體在鏡面所成之像。引用到電腦網(wǎng)絡(luò)上,一個網(wǎng)站的鏡像是指對一個網(wǎng)站內(nèi)容的拷貝。鏡像通常用于為相同信息內(nèi)容提供不同的源,特別是在下載量大的時候提供了一種可靠的網(wǎng)絡(luò)連接。
  3. 鏡像源:鏡像源就是把官方的源作為一個鏡像,你可以在這下載軟件。比如ubuntu官方源在國外,下載軟件可能會很慢,這時候就需要換成國內(nèi)的鏡像源。

二、問題復(fù)現(xiàn)

root@zynq:/etc/apt# apt-get update
Ign http://mirrors.tuna.tsinghua.edu.cn jessie InRelease
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates InRelease
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates InRelease
Ign http://mirrors.tuna.tsinghua.edu.cn jessie Release.gpg
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates Release.gpg
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates Release.gpg
Ign http://mirrors.tuna.tsinghua.edu.cn jessie Release
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates Release
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates Release
Err http://mirrors.tuna.tsinghua.edu.cn jessie/main Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/contrib Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/non-free Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/main armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/contrib armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/non-free armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/contrib Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/contrib Translation-en
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/main Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/main Translation-en
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/non-free Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/non-free Translation-en
Err http://mirrors.tuna.tsinghua.edu.cn jessie-updates/main Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie-updates/contrib Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie-updates/non-free Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie-updates/main armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie-updates/contrib armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie-updates/non-free armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates/contrib Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates/contrib Translation-en
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates/main Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates/main Translation-en
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates/non-free Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie-updates/non-free Translation-en
Err http://mirrors.tuna.tsinghua.edu.cn jessie/updates/main Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/updates/contrib Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/updates/non-free Sources
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/updates/main armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/updates/contrib armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Err http://mirrors.tuna.tsinghua.edu.cn jessie/updates/non-free armhf Packages
  404  Not Found [IP: 101.6.15.130 80]
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates/contrib Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates/contrib Translation-en
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates/main Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates/main Translation-en
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates/non-free Translation-en_US
Ign http://mirrors.tuna.tsinghua.edu.cn jessie/updates/non-free Translation-en
W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie/main/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie/contrib/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie/non-free/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie/main/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie/contrib/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie/non-free/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie-updates/main/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie-updates/contrib/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie-updates/non-free/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie-updates/main/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie-updates/contrib/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian/dists/jessie-updates/non-free/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/jessie/updates/main/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/jessie/updates/contrib/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/jessie/updates/non-free/source/Sources  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/jessie/updates/main/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/jessie/updates/contrib/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/jessie/updates/non-free/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

我們用apt-get update時候發(fā)現(xiàn)更新失敗,查詢發(fā)現(xiàn)國內(nèi)debian鏡像源已經(jīng)不維護(hù)這個jessie版本的源,所以導(dǎo)致更新失敗。怎么去解決呢?毫無疑問,這個時候需要換一個國內(nèi)持續(xù)維護(hù)的debian鏡像源

三、更換鏡像源步驟

  1. 先選擇一個目前還在維護(hù)合適的鏡像源:https://mirrors.tuna.tsinghua.edu.cn/help/debian/
  2. 在arm開發(fā)板上更換國內(nèi)鏡像源,這里我選擇的debian 11 bullseye。
    # 默認(rèn)注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
    
    deb https://security.debian.org/debian-security bullseye-security main contrib non-free
    # deb-src https://security.debian.org/debian-security bullseye-security main contrib non-free
    
  3. 執(zhí)行apt update,之后會發(fā)現(xiàn)報錯,信息如下:
    嵌入式LINUX開發(fā)系列之ARM板子如何替換debian鏡像源,linux開發(fā),linux
    解決方法:
    cd /usr/lib/apt/methods
    ln -s http https
    
    再次執(zhí)行apt update,發(fā)現(xiàn)又出現(xiàn)報錯,信息如下:
    嵌入式LINUX開發(fā)系列之ARM板子如何替換debian鏡像源,linux開發(fā),linux
    解決方法:
    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131 605C66F00D6C9793 112695A0E562B32A 54404762BBB6E853
    
    最后再次執(zhí)行:apt update 無報錯。
  4. 執(zhí)行apt upgrade,問題解決。

總結(jié)

以上就是今天要講的內(nèi)容,本文簡單介紹了ARM板子debian鏡像源替換方法,一個好的穩(wěn)定的鏡像源可以有效提升我們嵌入式開發(fā)效率。希望大家點點關(guān)注,訂閱,持續(xù)更新,張工致力于有效解決我們項目開發(fā)過程中遇到的問題。文章來源地址http://www.zghlxwxcb.cn/news/detail-843029.html

到了這里,關(guān)于嵌入式LINUX開發(fā)系列之ARM板子如何替換debian鏡像源的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

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

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

相關(guān)文章

  • 嵌入式Linux:如何進(jìn)行嵌入式Linux開發(fā)?

    目錄 1、裸機開發(fā) 2、SDK開發(fā) 3、驅(qū)動開發(fā) 3.1、字符設(shè)備驅(qū)動 3.2、塊設(shè)備驅(qū)動 3.3、網(wǎng)絡(luò)設(shè)備驅(qū)動 4、應(yīng)用開發(fā) 嵌入式Linux開發(fā)主要有四種方式:裸機開發(fā)、SDK開發(fā)、驅(qū)動開發(fā)和應(yīng)用開發(fā)。 裸機開發(fā)通常指在沒有操作系統(tǒng)支持的環(huán)境中直接在硬件上運行程序的開發(fā)。這種開發(fā)方

    2024年01月25日
    瀏覽(30)
  • 嵌入式Linux驅(qū)動開發(fā)系列六:Makefile

    嵌入式Linux驅(qū)動開發(fā)系列六:Makefile

    Makefile是什么? gcc hello.c -o hello gcc aa.c bb.c cc.c dd.c ... make工具和Makefile make和Makefile是什么關(guān)系? make工具:找出修改過的文件,根據(jù)依賴關(guān)系,找出受影響的相關(guān)文件,最后按照規(guī)則單獨編譯這些文件。 Makefile文件:記錄依賴關(guān)系和編譯規(guī)則。 必須要學(xué)精Makefile嗎? 怎么學(xué)習(xí)Makefi

    2024年02月13日
    瀏覽(23)
  • 嵌入式Linux驅(qū)動開發(fā)系列五:Linux系統(tǒng)和HelloWorld

    嵌入式Linux驅(qū)動開發(fā)系列五:Linux系統(tǒng)和HelloWorld

    三個問題 了解Hello World程序的執(zhí)行過程有什么用? 編譯和執(zhí)行:Hello World程序的執(zhí)行分為兩個主要步驟:編譯和執(zhí)行。編譯器將源代碼轉(zhuǎn)換為可執(zhí)行文件,然后計算機執(zhí)行該文件并輸出相應(yīng)的結(jié)果。了解這個過程可以幫助我們理解如何將代碼轉(zhuǎn)化為可運行的程序。 語法和語義

    2024年02月13日
    瀏覽(25)
  • 【嵌入式開發(fā) Linux 常用命令系列 7 -- awk 常用方法】

    上篇文章:嵌入式開發(fā) Linux 常用命令系列 6 – 字符提取 cut 命令使用 下篇文章:嵌入式開發(fā) Linux 常用命令系列 8 – 二進(jìn)制轉(zhuǎn)為16進(jìn)制常用命令 AWK是一種強大的文本分析工具,最初是由 Aho, Weinberger 和 Kernighan 設(shè)計和實現(xiàn)的,AWK 的名稱就來源于他們?nèi)说男帐鲜鬃帜浮T贚in

    2024年02月15日
    瀏覽(52)
  • 嵌入式開發(fā)——ARM介紹

    嵌入式開發(fā)——ARM介紹

    ARM是一種芯片架構(gòu),由英國的ARM Holdings公司開發(fā)和授權(quán),被廣泛應(yīng)用于各種嵌入式系統(tǒng)、移動設(shè)備和消費電子產(chǎn)品中。ARM架構(gòu)被設(shè)計成低功耗、高性能、可定制化的特點,能夠滿足各種應(yīng)用場景下的需求。 ARM架構(gòu)主要設(shè)計了以下幾個部分內(nèi)容: 指令集架構(gòu) (Instruction Set Ar

    2024年02月04日
    瀏覽(101)
  • 【ARM 嵌入式 編譯系列 10.4 -- 生成二進(jìn)制文件】

    在嵌入的工作中,經(jīng)常會使用到二進(jìn)制文件,那么我們?nèi)绾巫约荷梢粋€二進(jìn)制文件呢?接下來介紹如何將一個只包含將32位數(shù)據(jù)的文件轉(zhuǎn)化為二進(jìn)制文件,原文件如下(數(shù)據(jù)一共 64bytes): 我們使用 gcc 對齊先進(jìn)行編譯然后再進(jìn)行反匯編: 具體命令如下: 通過上面命令會生成

    2024年02月02日
    瀏覽(62)
  • 【ARM 嵌入式 編譯系列 2.1 -- GCC 編譯參數(shù)學(xué)習(xí)】

    請閱讀 【ARM GCC 編譯專欄導(dǎo)讀】 上篇文章:ARM 嵌入式 編譯系列 2 – GCC 編譯過程介紹 下篇文章:ARM 嵌入式 C 入門及漸進(jìn) 3 – GCC attribute ((weak)) 弱符號使用 上篇文章 ARM 嵌入式 編譯系列 2 – GCC 編譯過程介紹 已經(jīng)介紹過了具體的編譯流程,本篇文章主要介紹變過程中常見的

    2024年02月13日
    瀏覽(51)
  • 【ARM 嵌入式 編譯系列 3.5 -- gcc 鏈接參數(shù)介紹】

    請閱讀 【嵌入式開發(fā)學(xué)習(xí)必備專欄 之 ARM GCC 編譯專欄】 上篇文章【ARM 嵌入式 編譯系列 3.4 – 查看所依賴庫文件的路徑 詳細(xì)介紹】一直在提 鏈接參數(shù) ,那么鏈接參數(shù)有哪些,它們又有什么作用呢? 如前一篇文章中的的鏈接參數(shù)到底是什么意思呢? -L : 指定了 鏈接庫的路徑

    2024年01月17日
    瀏覽(44)
  • ARM裸機開發(fā)——簡易嵌入式游戲開發(fā)

    ARM裸機開發(fā)——簡易嵌入式游戲開發(fā)

    利用LCD屏,實現(xiàn)簡易的圖片展示,展示個人信息 利用圖片顯示與按鍵功能實現(xiàn)簡易的游戲設(shè)計,需要包含動畫連貫展示 ? 本實驗主要為具體游戲設(shè)計,主要包含游戲架構(gòu)設(shè)計、底層硬件設(shè)計、具體代碼實現(xiàn)四部分,設(shè)計了本項目方案的架構(gòu)圖如圖2.1所示。 圖2.1 游戲設(shè)計整

    2024年02月06日
    瀏覽(24)
  • 嵌入式培訓(xùn)機構(gòu)四個月實訓(xùn)課程筆記(完整版)-Linux ARM驅(qū)動編程第三天-ARM Linux ADC和觸摸屏開發(fā) (物聯(lián)技術(shù)666)

    嵌入式培訓(xùn)機構(gòu)四個月實訓(xùn)課程筆記(完整版)-Linux ARM驅(qū)動編程第三天-ARM Linux ADC和觸摸屏開發(fā) (物聯(lián)技術(shù)666)

    鏈接:https://pan.baidu.com/s/1V0E9IHSoLbpiWJsncmFgdA?pwd=1688 提取碼:1688 ? 教學(xué)內(nèi)容: 1 、 ADC S3C2440 的 A/D 轉(zhuǎn)換器包含一個 8 通道的模擬輸入轉(zhuǎn)換器,可以將模擬輸入信號轉(zhuǎn)換成 10 位數(shù)字編碼。 在 A/D 轉(zhuǎn)換時鐘頻率為 2.5MHz 時,其最大轉(zhuǎn)換率為 500KSPS ( 5 個時鐘周期完成一次轉(zhuǎn)換) 輸

    2024年02月20日
    瀏覽(26)

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

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

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

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包