答案1
以下链接中也有同样的问题
在 Ubuntu 上获取 + 安装 gcc/g++ 4.9?
它说 ,
下载所有这些:
binutils_2.24-3_amd64.deb cpp-4.9_4.9-20140218-1_amd64.deb g++-4.9_4.9-20140218-1_amd64.deb gcc-4.9_4.9-20140218-1_amd64.deb gcc-4.9-base_4.9-20140218-1_amd64.deb libasan1_4.9-20140218-1_amd64.deb libatomic1_4.9-20140218-1_amd64.deb libcilkrts5_4.9-20140218-1_amd64.deb libgcc1_4.9-20140218-1_amd64.deb libgcc-4.9-dev_4.9-20140218-1_amd64.deb libgomp1_4.9-20140218-1_amd64.deb libitm1_4.9-20140218-1_amd64.deb liblsan0_4.9-20140218-1_amd64.deb libmpfr4_3.1.2-1_amd64.deb libquadmath0_4.9-20140218-1_amd64.deb libstdc++-4.9-dev_4.9-20140218-1_amd64.deb libstdc++6_4.9-20140218-1_amd64.deb libtsan0_4.9-20140218-1_amd64.deb libubsan0_4.9-20140218-1_amd64.deb libvtv0_4.9-20140218-1_amd64.deb
从 Debian 的服务器,例如:
http://ftp.us.debian.org/debian/pool/main/g/gcc-4.9/libgcc-4.9-dev_4.9-20140218-1_amd64.deb
然后安装它们,例如:$ for package in *.deb; do sudo dpkg --install "$package"; done