docker容器中ubuntu apt-get Cannot initiate the connection to 61588:80 (0.0.240.148). - connect (22: Invalid argument)


Docker容器中ubuntu系統連不上外網

 

還是說說我遇到的情況  apt-get update  結果出現  E: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu/dists/xenial-backports/restricted/source/Sources  Cannot initiate the connection to 61588:80 (0.0.240.148). - connect (22: Invalid argument)    

搜索很久無果 遂做個記錄

很明顯是連不上網  端口的問題   然后參考別人的博客

echo $http_proxy     結果是docker.for.mac.localhost:61588

然后我又pull了一個centos的源  跑起來之后發現yum完全沒問題  

執行這個命令  echo $http_proxy   打印為空  

靈機一動把  輸入命令 http_proxy=''

就好了   0.0   Exciting

 

 

 

參考  https://blog.csdn.net/chenxiancool/article/details/21225723


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM