Ubuntu10下安装tinyos2.1.0

一、添加下面的repository到/etc/apt/sources.list中:

deb http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb  http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main

注意:tinyos的源对应的distribution用hardy,而不是intrepid。

 

二、

apt-get update
apt-get install tinyos-2.1.0
当然啦,你也可以用synaptic包管理器来安装。
当所有的包依赖关系都自动解决了,安装过程自然就只剩下一个等待的过程了。

安装python开发包:
apt-get install python-dev

编辑/opt/tinyos-2.1.0/tinyos.sh文件,修改CLASSPATH环境变量如下:

添加路径到.bashrc

CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar:.

  

在启动shell时,自动设置TinyOS环境变量。在$HOME下的.bashrc文件中添加下面语句:

if [ -f /opt/tinyos-2.1.0/tinyos.sh ] ; then

. /opt/tinyos-2.1.0/tinyos.sh

fi

source /opt/tinyos-2.1.0/tinyos.sh
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.

 

接着
sudo tos-install-jni
sudo apt-get install g++
sudo apt-get install python

sudo apt-get install python-dev
sudo chmod 777 /opt/tinyos-2.1.0/apps/Blink

Ok,一切搞定。运行tos-check-env检查你一下你有没有正确安装吧。
不过,记得关闭所有的终端,重启shell,这样新的环境变量才会生效。
关于graphvis的WARNING可以忽略的。

你可能感兴趣的:(ubuntu)