I am following this tutorial to install TinyOS but when I run sudo apt-get install tinyos it says unable to locate package. I have tried all distributions.

4 Answers 4


From the TinyOS tutorial at your link:

Supported distributions are (hardy, intrepid, jaunty, karmic)

All of these Ubuntu releases are end of life and are no longer supported by updates. You are using Ubuntu 14.04 which is not supported by the TinyOS package repository that is shown in the tutorial at your link.

Instead I followed the instructions from Automatic installation - TinyOS Wiki to install TinyOS in Ubuntu 14.04 (it also works in Ubuntu 16.04).

Install TinyOS in Ubuntu 14.04 and 16.04

  1. Visit TinyOS (TinyProd) Debian Development Repository and follow these instructions:

    1. Tell apt about the TinyProd Signing Key.

      wget -O - http://tinyprod.net/repos/debian/tinyprod.key | sudo apt-key add -
    2. Add the two new lines to /etc/apt/sources.list.d/tinyprod-debian.list:

      sudo -s
      cd /etc/apt/sources.list.d
      echo "deb http://tinyprod.net/repos/debian wheezy main" >> tinyprod-debian.list
      echo "deb http://tinyprod.net/repos/debian msp430-46 main" >> tinyprod-debian.list
    3. Install the new packages:

      sudo apt-get update  
      sudo apt-get install nesc tinyos-tools  

      I didn't install either msp430-46 or avr-tinyos at this step, in case you want to install them later after you have tested your TinyOS installation.

  2. Get the code from the TinyOS release repository:

    wget http://github.com/tinyos/tinyos-release/archive/tinyos-2_1_2.tar.gz  
    tar xf tinyos-2_1_2.tar.gz  

    This will extract the actual TinyOS code in a folder named tinyos-release-tinyos-2_1_2 inside the directory the command was issued. Feel free to rename this folder to tinyos-main.

  3. You will need to add some environment variables to your shell. The following file includes the necessary ones. Substitute the placeholder with the path where you chose to place the code in the previous section (full path recommended).

    # Here we setup the environment
    # variables needed by the tinyos 
    # make system
    export TOSROOT="<local-tinyos-path>"
    export TOSDIR="$TOSROOT/tos"
    export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
    export MAKERULES="$TOSROOT/support/make/Makerules"
    export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python
    echo "setting up TinyOS on source path $TOSROOT"

    Suppose you named this file tinyos.env. There are now at least two possibilities to have these variables accessible in your shell:

    1. Place it as root user in /etc/profile.d/
    2. Place it in <local-tinyos-path> and add the following line to your .bashrc

      source <local-tinyos-path>/tinyos.env  

After the TinyOS installation is finished, you can check if it is successful by executing some of these commands:

tos-bsl                 tos-ident-flags         tos-serial-debug
tos-build-deluge-image  tos-install-jni         tos-set-symbols
tos-channelgen          tos-locate-jre          tos-storage-at45db
tos-check-env           tos-mote-key            tos-storage-pxa27xp30
tos-decode-flid         tos-mviz                tos-storage-stm25p
tos-deluge              tos-ramsize             tos-write-buildinfo
tos-dump.py             tos-serial-configure    tos-write-image

I happened to have the same issue and I solved it in the following way.

  1. I downloaded the tinyos package form their github repo tiny-os-main.

  2. I extracted it to my Desktop (you can extract it wherever you want and note down the path).

  3. I then installed tinyos-tools from apt using apt-get install tinyos-tools.

  4. I then followed the 3rd instruction form the link Automatic Installation - TinyOS Wiki to setup the environment. The "local-tinyos-path" is the path you noted down in step 2.

Btw I am using Ubuntu 14.04.

Hope this helps.

  • Before the above procedure, I first setup my machine with toolchain from link.
    – Sripad
    Jul 7, 2014 at 7:59

Install TinyOS on Ubuntu 18.04

You don't need to download source for TinyOS, these command would do that:

% sudo apt-get update
% sudo apt-get install tinyos-tools bison flex graphviz
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java default-jre default-jre-headless fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libjama-java libpcsclite1 nescc
  openjdk-11-jre openjdk-11-jre-headless tinyos-source uisp
Suggested packages:
  default-java-plugin libjama-java-doc pcscd gcc-avr gcc-msp430 libnss-mdns fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
The following NEW packages will be installed:
  ca-certificates-java default-jre default-jre-headless fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libjama-java libpcsclite1 nescc
  openjdk-11-jre openjdk-11-jre-headless tinyos-source tinyos-tools uisp
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.2 MB of archives.
After this operation, 233 MB of additional disk space will be used.
Do you want to continue? [Y/n]y

The above commands install Java, nescc (v1.3.5), tinyos-source (v2.1.2), and tinyos-tools (v.1.4.2).

The source code for TinyOS will be placed in /usr/src/tinyos.

After installing these, you will need to add some enviroment variables to your shell by:

source /etc/profile.d/tinyos.sh

Or to add these enviroment variables automatically, type:

printf 'source /etc/profile.d/tinyos.sh\n' | tee -a "$HOME/.bash_profile"

Next, check the installation with:


Finally, change owner of TinyOS source:

% printenv TOSROOT
% sudo chown -R "$USER". "$TOSROOT"

Useful links


That will happen if the package name is typed incorrectly , you can double check package name in the software center or install from there . The terminal is case sensitive for some operations , use lower case for installing packages. sudo apt- get install name. It may depend which repository those packages are in and whether those repositories are enabled. I am no expert on apt - get, but if you list which packages you are looking for , someone may be able to help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.