From 87ec3ac0fffb18cca1629ce8074fb029c52bf9d9 Mon Sep 17 00:00:00 2001 From: Nico Rey Date: Tue, 5 Jan 2021 21:55:26 -0300 Subject: [PATCH 1/2] add php7.2 repo if on stretch --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index 366c048..b7349c1 100755 --- a/install.sh +++ b/install.sh @@ -40,6 +40,14 @@ fi ### Install required packages log_running "Installing required packages..." + +raspbian_version="$(lsb_release -c --short)" + +if [ "$raspbian_version" == "stretch" ]; then + wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - + echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php7.list +fi + sudo apt update -yq sudo apt install -yq predict \ python-setuptools \ From 603d93411f9d1f1f0eb2b4b017cc9de378ca0f21 Mon Sep 17 00:00:00 2001 From: Nico Rey Date: Tue, 5 Jan 2021 22:22:57 -0300 Subject: [PATCH 2/2] install libgfortran-5-dev if on stretch --- install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index b7349c1..4bc9d38 100755 --- a/install.sh +++ b/install.sh @@ -70,8 +70,13 @@ sudo apt install -yq predict \ socat \ php7.2-fpm \ php7.2-sqlite \ - sqlite3 \ - libgfortran5 + sqlite3 + +if [ "$raspbian_version" == "stretch" ]; then + sudo apt install -yq libgfortran-5-dev +else + sudo apt install -yq libgfortran5 +fi sudo pip3 install numpy ephem tweepy Pillow log_done "Packages installed"