我的版本Ubuntu 10.10

1. 安装配置 Sun Java 1.6

下载Sun JDK1.6,在下面的网址中找对应的64位版本下载,我用的是 jdk-6u32-linux-x64.bin

http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html

下载后安装,配置Java环境变量。

export JAVA_HOME= /usr/lib/jvm/1.5.0_05(你自己的路径)

export PATH=$JAVA_HOME/bin:$PATH

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

【我的做法: 将安装产生的jdk1.6.0_31 目录放在 /usr/lib/jvm下

修改/etc/profile,文件末尾加上:

JAVA_HOME=/usr/lib/jvm/jdk1.6.0_31/
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH

java -version 确认一下环境变量是否配置成功。

java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)


2.安装编译所需的其他工具

1.)修改source.list

$sudo vi /etc/apt/sources.list

添加以下内容:

deb http://archive.ubuntu.com/ubuntu/lucid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/lucid-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/lucid-security main restricted universe multiverse
#Ubuntu10.10 APT repository
deb http://archive.ubuntu.com/ubuntumaverick main restricted universe multiverse

2.)   更新源

$sudo apt-get update

3.)   安装所需的包

$sudo apt-get install flex bison gperfbuild-essential curl zlib1g-dev g++-multilib g++-4.4-multiliblibc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-devlibx11-dev lib32readline5-dev lib32z1-dev wine mingw32 tofrodos zip libgl1-mesa-dev


3. 编译

代码根目录下直接make。


Logo

更多推荐