-1

我正在尝试在 Ubuntu 虚拟机中安装 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.

我尝试进行自动删除,更新,但没有任何效果。你能帮帮我吗?

4

2 回答 2

0

也许你可以下载这个

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

然后输入命令

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

最后,您可以重试之前的命令。

于 2017-07-26T15:22:52.287 回答
0

如果您熟悉vagrant,您可以使用我的TinyOS Vagrant 配置来设置虚拟机,或者如果熟悉 Ansible,只需使用我的TinyOS Ansible 角色,我将其用作模板来描述以下步骤。

如果不按照以下步骤操作。这些应该适用于 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

现在你应该准备好了……玩得开心。

于 2017-02-17T22:55:14.317 回答