Trying to install homebridge in a container and receiving this error using this homebridge-balena
[homebridge] npm notice
[homebridge] npm notice New minor version of npm available! 7.5.3 -> 7.9.0
[homebridge] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.9.0>
[homebridge] npm notice Run `npm install -g npm@7.9.0` to update!
[homebridge] npm notice
[homebridge]
[homebridge] npm ERR! code 1
[homebridge]
[homebridge] npm ERR! path /usr/src/app/node_modules/node-pty-prebuilt-multiarch
[homebridge]
[homebridge] npm ERR!
[homebridge] command failed
[homebridge]
[homebridge] npm ERR!
[homebridge] command sh -c prebuild-install || node scripts/install.js
[homebridge]
[homebridge] npm ERR!
[homebridge] gyp info it worked if it ends with ok
[homebridge] npm ERR!
[homebridge] gyp info using node-gyp@7.1.2
[homebridge] npm
[homebridge] ERR! gyp info using node@15.10.0 | linux | arm
[homebridge]
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python Python is not set from command line or npm configuration
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python Python is not set from environment variable PYTHON
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python checking if "python3" can be used
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python - "python3" is not in PATH or produced an error
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python checking if "python" can be used
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python - "python" is not in PATH or produced an error
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python checking if "python2" can be used
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python - "python2" is not in PATH or produced an error
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python
[homebridge] npm
[homebridge] ERR! gyp ERR! find Python **********************************************************
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python You need to install the latest version of Python.
[homebridge] npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
[homebridge] npm
[homebridge] ERR! gyp ERR! find Python you can try one of the following options:
[homebridge] npm
[homebridge]
[homebridge] ERR!
[homebridge] gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python (accepted by both node-gyp and npm)
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python - Set the environment variable PYTHON
[homebridge] npm
[homebridge] ERR! gyp ERR! find Python - Set the npm configuration variable python:
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
[homebridge] npm
[homebridge]
[homebridge] ERR!
[homebridge] gyp ERR! find Python For more information consult the documentation at:
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
[homebridge] npm ERR!
[homebridge] gyp ERR! find Python **********************************************************
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! find Python
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! configure error
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! stack Error: Could not find any Python installation to use
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:302:47)
[homebridge] npm ERR!
[homebridge] gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
[homebridge] npm ERR!
[homebridge] gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! stack at exithandler (node:child_process:333:5)
[homebridge] npm ERR!
[homebridge] gyp ERR! stack at ChildProcess.errorhandler (node:child_process:345:5)
[homebridge] npm ERR!
[homebridge] gyp ERR! stack at ChildProcess.emit (node:events:378:20)
[homebridge] npm ERR!
[homebridge] gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
[homebridge] npm ERR!
[homebridge] gyp ERR! stack at onErrorNT (node:internal/child_process:480:16)
[homebridge] npm
[homebridge] ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:81:21)
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! System Linux 4.15.0-45-generic
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
[homebridge] npm ERR! gyp ERR! cwd /usr/src/app/node_modules/node-pty-prebuilt-multiarch
[homebridge] npm ERR!
[homebridge] gyp ERR! node -v v15.10.0
[homebridge] npm ERR!
[homebridge] gyp ERR! node-gyp -v v7.1.2
[homebridge] npm
[homebridge] ERR!
[homebridge] gyp ERR! not ok
[homebridge]
[homebridge]
[homebridge]
[homebridge] npm ERR!
[homebridge] A complete log of this run can be found in:
[homebridge] npm ERR!
[homebridge] /root/.npm/_logs/2021-04-11T23_51_59_664Z-debug.log
[homebridge]
[homebridge] Removing intermediate container 2116d5b18998
[homebridge] The command '/bin/sh -c JOBS=MAX npm ci --production --unsafe-perm && npm cache clean --force' returned a non-zero code: 1
I was able to get it to run by installing python RUN apt-get update && apt-get install python make g++ -y
but once I got in I received a permission error where it couldn’t run the setup.sh file. Any help is appreciated, thank you in advance.
Here is my docker-compose.yml
version: "2.1"
volumes:
pihole_config:
dnsmasq_config:
services:
mybot:
build: ./mybot
privileged: true
homebridge:
build: ./homebridge
privileged: true
pihole:
build: ./pihole
privileged: true
volumes:
- "pihole_config:/etc/pihole"
- "dnsmasq_config:/etc/dnsmasq.d"
dns:
- "127.0.0.1"
- "1.1.1.1"
network_mode: host
# https://github.com/klutchell/unbound-dnscrypt
unbound:
build: ./unbound
privileged: true
ports:
- "5053:5053/tcp"
- "5053:5053/udp"
# https://github.com/balenablocks/fbcp
fbcp:
image: balenablocks/fbcp:1.0.0
privileged: true
# prevent plymouth from blocking fbcp
# https://github.com/klutchell/balena-pihole/issues/25
# https://github.com/balena-os/meta-balena/issues/1772
dbus:
build: dbus
restart: on-failure
labels:
io.balena.features.dbus: "1"