The command ‘/bin/sh -c apt-get install -y vim’ returned a non-zzero code: 100
生活随笔
收集整理的這篇文章主要介紹了
The command ‘/bin/sh -c apt-get install -y vim’ returned a non-zzero code: 100
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
最近在學(xué)習(xí)docker時,發(fā)現(xiàn)使用ubuntu構(gòu)建鏡像時,如果有apt-get install命令,老是出現(xiàn)以下錯誤:The command ‘/bin/sh -c apt-get install -y vim’ returned a non-zzero code: 100
查了一下,發(fā)現(xiàn)很多人都說是使用ubuntu原始的源在apt-get install下載新包時,可能因為網(wǎng)絡(luò)問題導(dǎo)致出現(xiàn)此報錯。嘗試了一下?lián)Q源,果然成功解決了問題,下面附上解決方法。
解決方法
原始命令
RUN apt-get install -y vim
修改方法
RUN sed -i 's#http://archive.ubuntu.com/#http://mirrors.tuna.tsinghua.edu.cn/#' /etc/apt/sources.list; RUN apt-get update && apt-get install -y vim #或者這個都可以 RUN apt-get update --fix-missing && apt-get install -y vim --fix-missing 創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的The command ‘/bin/sh -c apt-get install -y vim’ returned a non-zzero code: 100的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 基于PaddleRec的用户点击率预测
- 下一篇: 论文浅尝 | 用可微的逻辑规则学习完成知