docker E: Unable to locate package nginx

apt-get install nginx

        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        E: Unable to locate package nginx

解决方法:apt-get update

这个命令的作用是:同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包。

等更新完毕以后再敲命令:apt-get install nginx

你可能感兴趣的文章

评论区

发表评论

必填

选填

选填

必填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。