-1

I am trying to install TinyOS 2.1.2 in Ubuntu Virtual Machine. During the execution of the following command I am facing the error mentioned.

$sudo apt-get install nesc tinyos-tools msp430-46 avr-tinyos

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 tinyos-tools : Depends: sun-java5-jre but it is not installable or
                         sun-java6-jre but it is not installable or
                         oracle-java6-jre but it is not installable or
                         sun-java7-jre but it is not installable or
                         openjdk-6-jre but it is not installable or
                         openjdk-7-jre but it is not installable
E: Unable to correct problems, you have held broken packages.

I tried to do autoremove, update, nothing worked. Could you please help me here ?

wedi
  • 1,332
  • 1
  • 13
  • 28

2 Answers2

0

If you are familiar with vagrant you could use my TinyOS Vagrant Configuration to setup a virtual machine or if familiar with Ansible just use my TinyOS Ansible Role which I used as a template to describe the steps below.

If not follow the steps below. These should work on Ubuntu 16.04:

First update your source lists: sudo apt-get update

NesC Installation

$ sudo apt-get install automake, autoconf, emacs, gperf, bison, flex, default-jdk
$ git clone -depth 1 https://github.com/tinyos/nesc.git /usr/local/src/nesc
$ cd /usr/local/src/nesc
$ ./Bootstrap
$ ./configure
$ make
$ make install

TinyOS Installation

$ sudo apt-get install automake, autoconf, emacs, gperf, bison, flex, graphviz, default-jdk, gcc-msp430
$ git clone -depth 1 https://github.com/tinyos/tinyos-main.git /usr/local/src/tinyos
$ cd /usr/local/src/tinyos/tools
$ ./Bootstrap
$ ./configure
$ make
$ make install
$ tos-install-jni
$ sudo cat <<EOT >> /etc/profile.d/tinyos.sh
export TINYOS_ROOT_DIR="/usr/local/src/tinyos"
export CLASSPATH=".:${CLASSPATH:+${CLASSPATH}:}${TINYOS_ROOT_DIR}/tools/tinyos/java/tinyos.jar"
EOT
$ sudo chmod 644 /etc/profile.d/tinyos.sh

Now you should be ready to go... Have fun.

wedi
  • 1,332
  • 1
  • 13
  • 28
0

Maybe you can download this

http://tinyprod.net/repos/debian/pool/main/t/tinyos-base/tinyos-base_2.1-20080806_all.deb

then typd the command

sudo dpkg -i tinyos-base_2.1-20080806_all.deb,, 

finally, you can try again your previous commands.