我想在Linux上为我的嵌入式板设置一个交叉编译环境。我的linux主机是ubuntu12.0432bit。
root@alcht:~# gcc --version
gcc (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@alcht:~# g++ --version
g++ (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@alcht:~# apt-get install g++-arm-linux-gnueabihf
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
binutils-arm-linux-gnueabihf cpp-4.6-arm-linux-gnueabihf cpp-arm-linux-gnueabihf g++-4.6-arm-linux-gnueabihf
gcc-4.6-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross
libgcc1-armhf-cross libgomp1-armhf-cross libstdc++6-4.6-dev-armhf-cross libstdc++6-armhf-cross
linux-libc-dev-armhf-cross
Suggested packages:
binutils-doc gcc-4.6-locales cpp-doc g++-4.6-multilib-arm-linux-gnueabihf gcc-4.6-doc
libstdc++6-4.6-dbg-armhf-cross gcc-4.6-multilib-arm-linux-gnueabihf libmudflap0-4.6-dev-armhf-cross
libgcc1-dbg-armhf-cross libgomp1-dbg-armhf-cross libquadmath-dbg-armhf-cross libmudflap0-dbg-armhf-cross
binutils-gold autoconf automake1.9 libtool flex bison gdb-arm-linux-gnueabihf gcc-doc
The following NEW packages will be installed:
binutils-arm-linux-gnueabihf cpp-4.6-arm-linux-gnueabihf cpp-arm-linux-gnueabihf g++-4.6-arm-linux-gnueabihf
g++-arm-linux-gnueabihf gcc-4.6-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libc6-armhf-cross
libc6-dev-armhf-cross libgcc1-armhf-cross libgomp1-armhf-cross libstdc++6-4.6-dev-armhf-cross
libstdc++6-armhf-cross linux-libc-dev-armhf-cross
apt-get安装g++-arm linux gnueabihf时如何选择gcc版本?
root@alcht:~# apt-get install gcc-4.8-arm-linux-gnueabihf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gcc-4.8-arm-linux-gnueabihf
E: Couldn't find any package by regex 'gcc-4.8-arm-linux-gnueabihf'
我应该更新源列表吗?或者我对gcc的依赖有什么问题?