分享Ubuntu19無法安裝docker源問題
按照各大網(wǎng)站以及個(gè)人習(xí)慣我會(huì)使用下面這種方法添加Docker源:
root@ubuntu:~# sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
然而使用上面這條命令給我?guī)砹藷o盡的煩惱,甚至我都懷疑我是不是一個(gè)合格的linux工程師了,使用了這條命令提示以下錯(cuò)誤:
Ign:1 https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu eoan InRelease Err:2 https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu eoan Release 404 Not Found [IP: 218.104.71.170 443] Hit:3 http://cn.archive.ubuntu.com/ubuntu eoan InRelease Hit:4 http://cn.archive.ubuntu.com/ubuntu eoan-updates InRelease Hit:5 http://cn.archive.ubuntu.com/ubuntu eoan-backports InRelease Hit:6 http://cn.archive.ubuntu.com/ubuntu eoan-security InRelease Reading package lists... Done E: The repository 'https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu eoan Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
下面是apt源文件中的內(nèi)容:
deb [arch=amd64] https://download.docker.com/linux/ubuntu eoan stable # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu eoan stable deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
發(fā)現(xiàn)是沒有任何錯(cuò)誤的,但是你會(huì)發(fā)現(xiàn)在使用apt更新時(shí)會(huì)出現(xiàn)各種各樣報(bào)錯(cuò),最終還是沒有你想要的docker-ce安裝包,還是無法安裝:
root@uduntu:~# apt-get update Get:1 http://cn.archive.ubuntu.com/ubuntu eoan InRelease [255 kB] Get:2 http://cn.archive.ubuntu.com/ubuntu eoan-updates InRelease [88.4 kB] Hit:3 http://cn.archive.ubuntu.com/ubuntu eoan-backports InRelease Get:4 http://cn.archive.ubuntu.com/ubuntu eoan-security InRelease [92.9 kB] Ign:5 https://download.docker.com/linux/ubuntu eoan InRelease Err:6 https://download.docker.com/linux/ubuntu eoan Release 404 Not Found [IP: 13.225.103.32 443] Reading package lists... Done E: The repository 'https://download.docker.com/linux/ubuntu eoan Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. root@uduntu:~# apt search docker-ce root@uduntu:~#
遇到這種問題我也覺得很頭疼,在網(wǎng)上找了很多解決方法都是不行,有人都說是網(wǎng)絡(luò)問題無法使用外網(wǎng)的源碼庫,我看到這個(gè)文章我都懵了,我還試過安裝網(wǎng)易、阿里以及科大的源都不能更好的解決問題,其實(shí)這個(gè)很簡單看一下阿里、科大和網(wǎng)易的他們的源碼庫是怎么往配置文件里面寫的,然后比葫蘆畫瓢畫一個(gè)不就完了
解決方法:
在sources.list添加下面這一條就可以:
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
更新apt源:
root@uduntu:~# apt-get update Get:1 http://cn.archive.ubuntu.com/ubuntu eoan InRelease [255 kB] Get:2 http://cn.archive.ubuntu.com/ubuntu eoan-updates InRelease [88.4 kB] Hit:3 http://cn.archive.ubuntu.com/ubuntu eoan-backports InRelease Get:4 http://cn.archive.ubuntu.com/ubuntu eoan-security InRelease [92.9 kB] Get:5 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB] Get:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [9,594 B] Fetched 511 kB in 11s (48.3 kB/s) Reading package lists... Done root@uduntu:~#
這樣就好了,不報(bào)錯(cuò)了,再看看docker-ce這個(gè)安裝包有沒有:
root@uduntu:~# apt search docker-ce Sorting... Done Full Text Search... Done docker-ce/bionic,now 5:19.03.4~3-0~ubuntu-bionic amd64 [installed] Docker: the open-source application container engine docker-ce-cli/bionic,now 5:19.03.4~3-0~ubuntu-bionic amd64 [installed,automatic] Docker CLI: the open-source application container engine root@uduntu:~
總結(jié)
以上所述是小編給大家介紹的分享Ubuntu19無法安裝docker源問題,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
如果你覺得本文對(duì)你有幫助,歡迎轉(zhuǎn)載,煩請(qǐng)注明出處,謝謝!
- 在Ubuntu?Server?22.04上安裝?Docker的詳細(xì)步驟記錄
- 一文詳解如何在Ubuntu系統(tǒng)中安裝docker
- 一步步詳解如何在Ubuntu?18.04上安裝Docker
- ubuntu22通過docker安裝wechat啟動(dòng)后無界面的問題及解決方法
- Ubuntu 20.04 上安裝和使用 Docker的詳細(xì)過程(安裝包)
- 在Docker中的ubuntu中安裝Python3和Pip的問題
- 樹莓派3B+安裝64位ubuntu系統(tǒng)和docker工具的操作步驟詳解
- Windows10安裝WSL2 Ubuntu20.04并設(shè)置docker環(huán)境的方法
- 在Ubuntu18.04上安裝Docker CE的方法(社區(qū)版)
- Ubuntu24.04LTS在線安裝Docker引擎的詳細(xì)過程
相關(guān)文章
Docker安裝Jenkins的實(shí)現(xiàn)步驟
版本與jdk版本以及各類插件有對(duì)應(yīng)關(guān)系,所以普通安裝較為麻煩,本文主要介紹了Docker安裝Jenkins的實(shí)現(xiàn)步驟,具有一定的參考價(jià)值,感興趣的可以了解一下2024-01-01
Docker容器時(shí)間與宿主機(jī)不一致/宿主機(jī)時(shí)間不同步校驗(yàn)問題
在Docker容器中,若未單獨(dú)配置localtime,可能導(dǎo)致時(shí)間與宿主機(jī)不一致,例如UTC與CST(東八區(qū))相差8小時(shí),解決方法包括在啟動(dòng)時(shí)通過docker run添加時(shí)間參數(shù),使用Dockerfile設(shè)置,或通過docker-compose配置,對(duì)于已運(yùn)行的容器2024-10-10
docker中搭建overlay 網(wǎng)絡(luò)實(shí)驗(yàn)環(huán)境
這篇文章主要介紹了docker中搭建overlay 網(wǎng)絡(luò)實(shí)驗(yàn)環(huán)境的相關(guān)資料,需要的朋友可以參考下2017-08-08
Docker安裝Jenkins-2.249.3-1.1的詳細(xì)過程
這篇文章主要介紹了Docker安裝Jenkins-2.249.3-1.1,通過編寫docke安裝腳本來實(shí)現(xiàn)安裝目的,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-10-10
解決虛擬機(jī)掛起后再恢復(fù)后Docker部署的應(yīng)用無法連接問題
這篇文章主要介紹了解決虛擬機(jī)掛起后再恢復(fù)后Docker部署的應(yīng)用無法連接問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2024-04-04

