Skip to content

Commit fdce71e

Browse files
committed
Updated pacakge repos for ARMv6
1 parent bc2bbba commit fdce71e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

install.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,24 @@ function installDependencies()
199199
if [ "$rasp_version" -eq "9" ]; then
200200
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
201201
fi
202-
sudo apt-get -y install apt-transport-https lsb-release ca-certificates curl
203-
sudo curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
204-
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
202+
203+
if [ "$cpu_version" == 6 ]; then
204+
sudo add-apt-repository ppa:ondrej/php
205+
elif [ "$cpu_version" == 7 ]; then
206+
sudo apt-get -y install apt-transport-https lsb-release ca-certificates curl
207+
sudo curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
208+
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
209+
fi
210+
205211
sudo apt-get update
206212
sudo apt-get dist-upgrade
207213
sudo apt-get upgrade
208214
# retry check if dependencies fail
209-
if ! sudo DEBIAN_FRONTEND=noninteractive apt-get install $php_package python3-pip supervisor nodejs npm git tmux curl wget zip unzip tmux htop libffi-dev libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev build-essential libncursesw5-dev libc6-dev openssl python3-opencv $opencv_packages -y --fix-missing; then
215+
if ! sudo DEBIAN_FRONTEND=noninteractive apt-get install $php_package python3-pip supervisor nodejs npm git tmux curl wget zip unzip tmux htop libffi-dev libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev build-essential libncursesw5-dev libc6-dev openssl python3-opencv -y --fix-missing; then
210216
# try a fix and install one more time
211217
log_warning "Failed to install dependencies. Trying to fix-missing and reinstall..."
212218
sudo apt-get install --fix-missing
213-
sudo DEBIAN_FRONTEND=noninteractive apt-get install $php_package python3-pip supervisor nodejs npm git tmux curl wget zip unzip tmux htop libffi-dev libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev build-essential libncursesw5-dev libc6-dev openssl python3-opencv $opencv_packages -y --fix-missing || log_error "Unable to install dependencies"
219+
sudo DEBIAN_FRONTEND=noninteractive apt-get install $php_package python3-pip supervisor nodejs npm git tmux curl wget zip unzip tmux htop libffi-dev libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev build-essential libncursesw5-dev libc6-dev openssl python3-opencv -y --fix-missing || log_error "Unable to install dependencies"
214220
else
215221
echo "Main Depepencies Successfully Installed"
216222
fi

0 commit comments

Comments
 (0)