2017-01-09 88 views
-1

我試圖在Ubuntu虛擬機中安裝TinyOS 2.1.2。在執行以下命令期間,我遇到了上述錯誤。TinyOS 2.1.2安裝失敗

$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. 

我試圖做的autoremove,更新,毫無效果。你能幫我在這裏嗎?

回答

0

如果您熟悉vagrant,您可以使用我的TinyOS Vagrant Configuration來設置虛擬機,或者如果熟悉Ansible,只需使用我的TinyOS Ansible Role作爲模板來描述以下步驟。

如果不遵循以下步驟。這些應該在Ubuntu 16.04的工作:

首先更新您的源列表:sudo apt-get update

NesC語言安裝

$ 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的安裝

$ 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 

現在,你應該準備好去...玩得開心。