LoginSignup
0
0

More than 3 years have passed since last update.

dockerで始めたNode-REDにnode-red-node-discoveryをインストールする

Last updated at Posted at 2020-01-25

node-red-node-discoveryがインストールできない

「パレットの管理」からnode-red-node-discoveryノードをインストールしようとしても、失敗してしまった。

node-red-node-discovery - npm
には

please read the install instructions for the underlying npm.

For Debian / Ubuntu this requires installing

sudo apt-get install libavahi-compat-libdnssd-dev

と書いてあるが、dockerで実行しているのでそもそもコマンドが実行できない…
その後もsudoコマンドがなかったり、apt-getがなかったりで色々苦労したので、メモを残しておく。

インストール手順

dockerにrootでbashログインする。

docker exec -it --user root mynodered /bin/bash

パッケージマネージャapkを使ってlibdnsをインストールする。

apk update
apk apk add avahi-compat-libdns_sd avahi-dev

その後、Node-REDの「パレットの管理」からnode-red-node-discoveryがインストールできる。


追記

実行に失敗する

上記手順でインストールできて安心していたところ、discoverノードを使っても Error: dns service error: unknown となってしまい、実行に失敗してしまう。

対処方法 募集中

avahi-discover を実行してみて、エラーに関係しそうな以下パッケージをインストールしてみた

apk add py-gtk py-dbus dbus py-avahi py-gdbm py-gobject py-gobject3 gtk+3.0

が、

bash-5.0# avahi-discover
Traceback (most recent call last):
  File "/usr/bin/avahi-discover", line 304, in <module>
    main()
  File "/usr/bin/avahi-discover", line 297, in main
    main_window = Main_window()
  File "/usr/bin/avahi-discover", line 70, in __init__
    self.ui.add_from_file(path)
gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/usr/share/avahi/interfaces/avahi-discover.ui”: No such file or directory (4)

の解決法がわからず断念。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0