[英]lxc-create stuck at connecting to archive.ubuntu.com
I am new to LXC. 我是LXC的新手。 I tried to create ubuntu container using the command
我尝试使用以下命令创建ubuntu容器
lxc-create -n onos -t ubuntu
The installation ran for some time and got stuck with below message 安装运行了一段时间,并被以下消息卡住
Installing Update
Connecting to archive.ubuntu.com
I am behind corporate proxy. 我落后于公司代理。 Apt-get update works fine in host.
Apt-get更新在主机中正常运行。 But when I try to create a ubuntu container I am having the above issue.
但是,当我尝试创建ubuntu容器时,出现了上述问题。
Did anyone faced similar issue. 有没有人遇到过类似的问题。 Please help.
请帮忙。
You should use proxy before lxc-create: 您应该在lxc-create之前使用代理:
export http_proxy="http://$pre$server:$port/"
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$http_proxy
export FTP_PROXY=$http_proxy
export RSYNC_PROXY=$http_proxy
lxc-create -n onos -t ubuntu
Also you can setup the proxy for apt: 您也可以为apt设置代理:
#cat /etc/apt/apt.conf.d/30proxy
Acquire::http::proxy "http://proxy:4128";
Acquire::https::proxy "https://proxy:4128";
PS: PS:
bug lxc-create doesn't take advantage of the apt proxy bug lxc-create没有利用apt代理
Here: lxc-create not working behind proxy a solution was: 此处:lxc-create在代理解决方案后无法正常工作 :
There was no problem with apt but, I had issue using debootstrap.
apt没有问题,但是我在使用debootstrap时遇到了问题。 Had to set up the proxy settings in /etc/wgetrc.
必须在/ etc / wgetrc中设置代理设置。 All fine now.
现在一切都好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.