diff --git a/scripts/install-moonraker.sh b/scripts/install-moonraker.sh index c6360664d..2e23633e5 100755 --- a/scripts/install-moonraker.sh +++ b/scripts/install-moonraker.sh @@ -44,8 +44,12 @@ install_packages() # Update system package info report_status "Running apt-get update..." sudo apt-get update --allow-releaseinfo-change - - system_deps="${SRCDIR}/scripts/system-dependencies.json" + if [apt-cache search grep | grep -q "python3-libgpiod"]; then + system_deps="${SRCDIR}/scripts/system-dependencies.json" + else + echo "can't install the libgpiod lib! the system might not support gpio, skipping installation of gpio lib's." + system_deps="${SRCDIR}/scripts/system-dependencies-without-gpio.json" + fi if [ -f "${system_deps}" ]; then if [ ! -x "$(command -v python3)" ]; then report_status "Installing python3 base package..." diff --git a/scripts/system-dependencies-without-gpio.json b/scripts/system-dependencies-without-gpio.json new file mode 100644 index 000000000..924132c09 --- /dev/null +++ b/scripts/system-dependencies-without-gpio.json @@ -0,0 +1,14 @@ +{ + "debian": [ + "python3-virtualenv", + "python3-dev", + "liblmdb-dev", + "libopenjp2-7", + "libsodium-dev", + "zlib1g-dev", + "libjpeg-dev", + "packagekit", + "wireless-tools", + "curl" + ] +}