k8s pod内安装软件包报错
查看pod节点进入podapt-get install vimmv /etc/apt/sources.list /etc/apt/sources.list.bakecho "deb http://mirrors.163.com/debian/ stretch main non-free contrib" >/etc/apt/sources.list &&echo "deb h
查看pod节点
进入pod
apt-get install vim
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://mirrors.163.com/debian/ stretch main non-free contrib" >/etc/apt/sources.list && echo "deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib" >>/etc/apt/sources.list && echo "deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib" >>/etc/apt/sources.list && echo "deb-src http://mirrors.163.com/debian/ stretch main non-free contrib" >>/etc/apt/sources.list && echo "deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib" >>/etc/apt/sources.list && echo "deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib" >>/etc/apt/sources.list && echo "deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib" >>/etc/apt/sources.list && echo "deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib" >>/etc/apt/sources.list
由于我的环境是通过代理上网的 我添加了如下配置
echo export http_proxy=http://x.x.x.x:8080 >> /etc/profile
source /etc/profile
接下来执行
apt-get update
执行
apt-get install curl
安装成功
更多推荐
所有评论(0)