Install GCC 4.4
First, install GCC 4.4 (and friends):
apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib gcc-4.4-multilib
Set 4.4 to be the default
Then set 4.4 to be higher priority than 4.6:
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 50
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 100
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 50
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.4 100
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 50
Verify that it has worked:
gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.6-11ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.6 (Ubuntu/Linaro 4.4.6-11ubuntu2)
0.Confirm your Gigabit Ethernet verison
root@Alan-dell-14R-Turbo:~# lspci | grep Ethernet
03:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)
1.Download Driver Package.
sudo su - #input your password
wget
2.Uncompress files and exec commands.
tar xvf compat-wireless-2012-03-12-p.tar.bz2
cd compat-wireless-2012-03-12-p
./scripts/driver-select alx
make
make install
./scripts/alx-enable atl1c
./scripts/alx-enable alx
modprobe alx
ifconfig # You will see some information like this
root@Alan-dell-14R-Turbo:~# ifconfig
eth1 Link encap:以太网 硬件地址 5c:f9:dd:xx:xx:xx
inet 地址:192.168.1.102 广播:192.168.1.255 掩码:255.255.255.0
inet6 地址: fe80::5ef9:ddff:fe3d:8c91/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:151919 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:86314 错误:0 丢弃:0 过载:0 载波:3
碰撞:0 发送队列长度:1000
接收字节:224592215 (224.5 MB) 发送字节:6266739 (6.2 MB)
中断:16
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 跃点数:1
接收数据包:581 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:581 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:54360 (54.3 KB) 发送字节:5436k0 (54.3 KB)
root@Alan-dell-14R-Turbo:~#ping
PING (74.125.71.105) 56(84) bytes of data.
64 bytes from hx-in-f105.1e100.net (74.125.71.105): icmp_req=1 ttl=52 time=261 ms
64 bytes from hx-in-f105.1e100.net (74.125.71.105): icmp_req=2 ttl=52 time=264 ms
Debian 7 不能安装ia32-libs
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs
二. 无法更新和下载androidSDK
打开SDK Manager时底部进度条一直不动,打开详细信息,发现卡在:
1
Fetching
解决办法:
修改hosts文件。
(1)windows下打开C:\Windows\System32\drivers\etc,以管理员身份编辑hosts文件,在最后添加:
74.125.237.1 dl-ssl.google.com
(2)linux下使用命令sudo vim /etc/hosts编辑hosts文件,同样在文件最后添加
74.125.237.1 dl-ssl.google.com
然后重新运行sdk manager,就可以下载了。