maglub / rpi-sous-vide

Raspberry pi based sous vide
MIT License
10 stars 0 forks source link

php5 obsolete in buster #15

Closed maglub closed 5 years ago

maglub commented 5 years ago

Introduction

#================================
# packages for php5/7 and lighttpd
#================================
* Checking installed packages
  - Checking php5-cgi  - Adding package php5-cgi to the install list
  - Checking php5  - Adding package php5 to the install list
  - Checking php5-sqlite  - Adding package php5-sqlite to the install list
  - Checking php5-cli  - Adding package php5-cli to the install list
  - Checking php5-rrd  - Adding package php5-rrd to the install list
  - Checking php5-curl  - Adding package php5-curl to the install list
  - Checking lighttpd  - Adding package lighttpd to the install list
  - Checking sqlite3  - Adding package sqlite3 to the install list
  - Checking bc  - Adding package bc to the install list
  - Checking screen  - Adding package screen to the install list
  - Checking python-dev  - Checking python-pip  - Installing packages:  php5-cgi php5 php5-sqlite php5-cli php5-rrd php5-curl lighttpd sqlite3 bc screen
Reading package lists...
Building dependency tree...
Reading state information...
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-sqlite is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-cgi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-cgi' has no installation candidate
E: Package 'php5' has no installation candidate
E: Package 'php5-sqlite' has no installation candidate
E: Package 'php5-cli' has no installation candidate
E: Unable to locate package php5-rrd
E: Package 'php5-curl' has no installation candidate
maglub commented 5 years ago

This was due to an unfortunate construct in setup.sh, that just defaulted any OS release that it didn't recognize as being very old. The "latest and greatest" names for the php packages were "reserved" for OS release "stretch".

I changed the construct now, so that any newer releases will use the "latest" packages.

curRelease=$(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2)
echo "  - OS Release: $curRelease"

case $curRelease in
  jessie|wheezy)
    #--- older raspbian
    #--- note, php5-cgi has to come before php5. Otherwise apt-get will install apache2 to satisfy dependencies
    #--- https://wildlyinaccurate.com/installing-php-on-debian-without-apache/
    for package in php5-cgi php5 php5-sqlite php5-cli php5-rrd php5-curl lighttpd sqlite3 bc screen python-dev python-pip
    do
      echo -n "  - Checking $package"
      sudo dpkg -s $package >/dev/null 2>&1 || { echo "  - Adding package $package to the install list" ; curInstallPackages="$curInstallPackages $package" ; }
    done
    ;;
  buster|stretch|*)
    for package in php-cgi php php-sqlite3 php-cli php-rrd php-mbstring php-curl lighttpd sqlite3 bc screen python-dev python-pip
      do
        echo -n "  - Checking $package"
        sudo dpkg -s $package >/dev/null 2>&1 || { echo "  - Adding package $package to the install list" ; curInstallPackages="$curInstallPackages $package" ; }
      done
    ;;
esac