编译openfst
的时候一直报错,
g++: internal compiler error: Killed (program cc1plus)
so,想到的便只能是升级GCC了,好在网上有一个repo
是给GCC4.8用的
1.
编辑/etc/apt/sources.list
sudo vim /etc/apt/sources.list
添加下面的内容
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
# Source repository to add
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
# Source repository to add
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
也就是源。。
2.
编辑/etc/apt/preferences
sudo vim /etc/apt/preferences
插入
Package: *
Pin: release n=wheezy
Pin-Priority: 900
Package: *
Pin: release n=jessie
Pin-Priority: 300
Package: *
Pin: release o=Raspbian
Pin-Priority: -10
update
sudo apt-get update
sudo apt-get install -t jessie gcc-4.8 g++-4.8
Install alternatives
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
Raspberry Pi 查看GCC version
sudo gcc --version
围观我的Github Idea墙, 也许,你会遇到心仪的项目