Ubuntu14.04 搜狐更新源及安装软件
sudo vim /etc/apt/source.list
# 将软件源改为 sohu 的
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
2. 更新并升级已有软件,并安装一些基础依赖库
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vim git build-essential unzip libv4l-dev libx264-dev
apt-get install libasound2-dev
sudo apt-get install libqt4-* libqml*
qt下载地址http://download.qt.io/archive/
ubuntu下JDK配置本质上和win是一样的:
1、去官网下载JDK、NDK
2、解压后得到名字为jdk = 1.8.0_131的文件夹,ndk = android-ndk-r14b。
3、配置jdk和ndk环境变量:
在启动终端并输入
- gedit/etc/profile
- #setjdkenvironment
- exportJAVA_HOME=/home/jeck/jdk/jdk1.8.0_131
- exportCLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
- exportPATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
- export ANDROID_NDK= /home/jeck/ndk/android-ndk-r14b
- PATH=$ANDROID_NDK:$PATH
终端输入一下命令使配置生效
4、查看配置是否成功。在终端输入
- Copyright (C) 2006 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.
- This program built for x86_64-pc-linux-gnu
5、配置默认JDK,ubuntu下默认JDK是openJDK。。终端输入
执行下面命令,配置需要默认的JDK
会列出jdk版本,其中被“*”标注的为默认JDK。如果要维持当前默认JDK,直接按回车键即可;否则输入相应JDK的编号将其设置为默认版本。