参考朝阳_tony的博客,网址:http://blog.csdn.net/linzhaolover/article/details/45023361
gcc-4.9降级到gcc-4.8
apt-get download \
cpp-4.8 \
g++-4.8 \
gcc-4.8 \
gcc-4.8-base \
libgcc-4.8-dev \
libstdc++-4.8-dev
# will download
cpp-4.8_4.8.2-19ubuntu1_ppc64el.deb
g++-4.8_4.8.2-19ubuntu1_ppc64el.deb
gcc-4.8_4.8.2-19ubuntu1_ppc64el.deb
gcc-4.8-base_4.8.2-19ubuntu1_ppc64el.deb
libgcc-4.8-dev_4.8.2-19ubuntu1_ppc64el.deb
libstdc++-4.8-dev_4.8.2-19ubuntu1_ppc64el.deb
# install
dpkg -i *.deb
设置软链接
gcc 默认到装到/usr/bin目录下
ln -f -s /usr/bin/gcc-4.8 /usr/bin/gcc
ln -f -s /usr/bin/gcc-ar-4.8 /usr/bin/gcc-ar
ln -f -s /usr/bin/gcc-nm-4.8 /usr/bin/gcc-nm
ln -f -s /usr/bin/gcc-ranlib-4.8 /usr/bin/gcc-ranlib
ln -f -s /usr/bin/g++-4.8 /usr/bin/g++
. gcc-4.8升级到gcc-4.9
apt-get download \
binutils \
binutils-dev \
cpp-4.9 \
g++-4.9 \
gcc-4.9 \
gcc-4.9-base \
libgcc-4.9-dev \
libstdc++-4.9-dev
dpkg -i *.deb
ln -f -s /usr/bin/gcc-4.9 /usr/bin/gcc
ln -f -s /usr/bin/gcc-ar-4.9 /usr/bin/gcc-ar
ln -f -s /usr/bin/gcc-nm-4.9 /usr/bin/gcc-nm
ln -f -s /usr/bin/gcc-ranlib-4.9 /usr/bin/gcc-ranlib
ln -f -s /usr/bin/g++-4.9 /usr/bin/g++