Solved: TinyOS error – tos-install-jni – [: 31: =: unexpected operator

by admin on November 9, 2010

in Tech Solution

Those who are you want to install and use TinyOS, you may face some unexpected error while using “tos-install-jni” command. So for you here are some tricks to solve those problems.

Problem 1: Permission denied
suzan@amrra.net:~$ tos-install-jni
[: 31: =: unexpected operator
Installing 32-bit Java JNI code in /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386 …
install: cannot remove `/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/libgetenv.so’: Permission denied

Solution 1: Use sudo with the command
suzan@amrra.net:~$ sudo tos-install-jni
[: 31: =: unexpected operator
Installing 32-bit Java JNI code in /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386 …
done.

Problem 2: [: 31: =: unexpected operator
suzan@amrra.net:~$ sudo tos-install-jni
[: 31: =: unexpected operator
Installing 32-bit Java JNI code in /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386 …
done.

Solution 2: Edit /usr/bin/tos-install-jni and change 1st line from “#!/bin/sh” to “#!/bin/bash”
suzan@amrra.net:~$ sudo tos-install-jni
Installing 32-bit Java JNI code in /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386 …
done.

Enjoy TinyOS!!

Written by admin

  • Zhou2090

    what about the error

    sinwel@ubuntu:/opt/tinyos-2.x/apps$ sudo tos-install-jni
    [sudo] password for sinwel:
    Java not found, not installing JNI code

  • Lordpegaso14

    It works! thank you!!

  • Jurus

    Thanks man

  • 东杰 张

    Wonderful.
    Thanks a lot.

  • Arnau

    Works!

    Thankyou

  • Guptasanchita68

    what about the error

    sudo : command not found

Previous post: