设置apt代理需要修改/etc/apt/apt.conf
脚本内容如下:
# file 1.sh
#!/bin/bash
PROXY_IP_PORT=$1
if [ -z ${/etc/apt/apt.conf} ];then
echo Please enter the Proxy IP and Port.
exit 1
fi
sudo sh -c 'echo
Acquire::http::proxy \http://127.0.0.1:8000/\;
Acquire::ftp
执行apt-get install xxxx时,报以下错误
E: There are problems and -y was used without –force-yes
解决方案:
vim /etc/apt/sources.list
删除原有,添加如下:
deb http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse
deb http://old-releases.ubunt