ubuntu 9.10 安装 G++ bison flex

1.打开终端,输入:sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份当前的源列表,以便日後需要时恢复)

sudo gedit /etc/apt/sources.list (修改sources.list文件中源的列表)
然后把里面的网址改为:

deb http://mirrors.sohu.com/ubuntu/ karmic main restricted
deb-src http://mirrors.sohu.com/ubuntu/ karmic main restricted
deb http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ karmic universe
deb-src http://mirrors.sohu.com/ubuntu/ karmic universe
deb http://mirrors.sohu.com/ubuntu/ karmic-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates universe
deb http://mirrors.sohu.com/ubuntu/ karmic multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates multiverse

Read more