jail(iocage)で、録画サーバその5

config.jsonの、mirakurunのURLを変更して起動してみたら、sqlite3のエラー。

root@recorder:~/EPGStation # npm start

> EPGStation@1.7.5 start /root/EPGStation
> node dist/server/index.js

internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module '/root/EPGStation/node_modules/sqlite3/lib/binding/napi-v3-freebsd-x64/node_sqlite3.node'

確かに node_modules/sqlite3/lib/binding/napi-v3-freebsd-x64 は無い。インストールに失敗してる?
そこだけやってみたら。。

root@recorder:~/EPGStation # npm install -f sqlite3
npm WARN using --force I sure hope you know what you are doing.

> sqlite3@5.0.0 install /root/EPGStation/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.0/napi-v3-freebsd-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@5.0.0 and node@12.18.4 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use

やっぱりpythonあやしかったかー。手っ取り早く ln -s /usr/local/bin/python3.7 /usr/local/bin/python してもう一度やると、今度は無事にビルドされた。
も一度起動。

root@recorder:~/EPGStation # npm start

> EPGStation@1.7.5 start /root/EPGStation
> node dist/server/index.js

[2020-09-25T02:45:33.168] [WARN] system - reserves.json is not found.
[2020-09-25T02:45:33.289] [WARN] system - dbinfo.json is not found.
[2020-09-25T02:45:33.295] [INFO] system - create dbinfo.json
[2020-09-25T02:45:33.322] [INFO] system - ServicesDB created
[2020-09-25T02:45:33.347] [INFO] system - ProgramsDB created
[2020-09-25T02:45:33.381] [INFO] system - RulesDB created
[2020-09-25T02:45:33.406] [INFO] system - RecordedDB created
[2020-09-25T02:45:33.448] [INFO] system - EncodedDB created
[2020-09-25T02:45:33.474] [INFO] system - RecordedHistoryDB created
[2020-09-25T02:45:33.486] [INFO] system - start Updater pid: 38047
[2020-09-25T02:45:34.006] [INFO] system - mirakurun -> services: 47
[2020-09-25T02:45:34.019] [INFO] system - insert Services done
[2020-09-25T02:45:34.429] [INFO] system - mirakurun -> programs: 11645
[2020-09-25T02:45:35.341] [INFO] system - insert Programs done.
[2020-09-25T02:45:35.347] [INFO] system - mirakurun -> tuners: 4
[2020-09-25T02:45:35.668] [INFO] system - updater done
[2020-09-25T02:45:35.670] [INFO] system - start updateAll
[2020-09-25T02:45:35.672] [INFO] system - done updateAll

ひとまずよし。