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