Automatic Installer Not working


#1

I installed Noobs 2.4.4 due to my SD card getting corrupted. I can boot into the GUI and download the installer, but this is what I get when running the install.sh file:

pi@BrewPi:~ $ sudo ~/brewpi-tools/install.sh

Checking for Internet connection…
Success!

Checking whether this script is up to date…

/home/pi/brewpi-tools is up-to-date.

***** Installing/updating required packages… *****

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 libapache2-mod-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-common 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 ‘libapache2-mod-php5’ has no installation candidate
E: Package ‘php5-cli’ has no installation candidate
E: Package ‘php5-common’ has no installation candidate
E: Package ‘php5-cgi’ has no installation candidate
E: Package ‘php5’ has no installation candidate

*** ERROR ERROR ERROR ERROR ERROR ***

See above lines for error message
Setup NOT completed

I tried to manually install the php and apache but was unsuccessful.


#2

I think the issue is that you are using a new version of raspbian (debian stretch) and the installer was written for debian jessie. Stretch uses php7 instead of 5.

I’ll take a look at the installer, but for now I recommend installing hypriot and deploying with docker, as described on wiki.brewpi.com


#3

Elco, Glad I found this. I suggest maybe you could pin somewhere that this is your new recommendation? I’ve been trying for 3 days to follow the old instructions… I didn’t even know there was a wiki.
Sam


#4

I feel you, I was facing the same issue yesterday. I also tried to installed old Jessie hoping that the old commands would work.


#5

I ended up downloading an older version of NOOBS (version 2.4.0) and installing BrewPi via the automatic installer. The archive folder is here: http://downloads.raspberrypi.org/NOOBS/images/


Help, my "brewpi" freezes
#6

Exactly Elco, the problem is in the new version of the OS. I’ve found a solution though (1 hour before I had to start new brew, after a flash of raspberry) :slight_smile:

  1. Change the default repository of your Raspbian
    sudo nano /etc/apt/sources.list
    change it so it looks like that:
    image
  2. Update the repository link
    sudo apt-get update
  3. install php package
    sudo apt-get install php5

Then try the automatic install script once again. Worked for me!


#7

I tried this procedure, and it is not working. PHP5 is not available.


#8

@poltorak | your repo update worked like a champ! Thanks for the help…I’m off and brewing now :smiley:


#9

Maybe update the install instructions linked from the brewpi website to specify which version of raspbian brewpi installer supports? Or at least include the fix described here? Fix seems to be working for me, thanks @poltorak!


#10

Oh my gosh. Can you PLEASE update the docs to specify that you need to use JESSIE to use the automated installer.

http://docs.brewpi.com/en/latest/installing-your-pi/rpi-setup.html


#11

This looked like it was going to work but then it failed here:

***** Downloading most recent BrewPi codebase… *****
Cloning into ‘/home/brewpi’…
/home/pi/brewpi-tools/install.sh: line 275: cd: y: No such file or directory
fatal: could not create work tree dir ‘y’: Permission denied

*** ERROR ERROR ERROR ERROR ERROR ***

See above lines for error message
Setup NOT completed


#12
  1. Don’t use the installer. It is deprecated. Please use the docker based install instead, as described on the wiki.
  2. You entered ‘y’ as directory name. Accept the default by just pressing enter or enter a valid directory.

#13

Does the docker image work with the legacy branch (needed for older version/Arduino)? I entered the container (docker exec) and trying running the updater tool but didn’t see a legacy branch option. Is there a different docker image tag that supports the legacy branch?

Update:

This is messy but it seems to be working…

First, i started fresh with a new instance of the docker image. Since i’m connected over USB, i added the below per the instructions here: https://hub.docker.com/r/brewpi/brewpi-ubuntu/.

--device=/dev/ttyACM0:/dev/ttyACM0

Now, enter the running container (if not running, start it).

docker exec -it brewpi /bin/bash

After some investigation, to fetch the entire set of remote branches you can do the following commands for each repo (-scripts, -www). The two repos are located in /home/brewpi and /var/www/html.

git remote set-branches origin '*'
git fetch -v

Next, i did a hard reset in /home/brewpi since there were some modifications from the tip of the master branch. Assume that happened somewhere in the containers startup process but figuring it doesn’t matter because i’m switching away from the master branch.

cd /home/brewpi
git reset --hard

Then i ran the updater script. Definately hit some errors but i think that’s okay. Failed to install php5 and related libraries. My fingers are crossed but whatever version is installed seems to be good enough so i ignored this. Skipped any modifications to cron and later errored on cron not being installed. This shouldn’t matter as docker is probably handling restarts (i hope). Errored on permission setting but thinking the container is probably running as root anyway. Like i said…messy.

cd ~/brewpi-tools
python updater.py --ask

Also, in my case, i already had the latest firmware on my Arduino Leonardo so i left that alone.

Finally, exit out of the container and restart it. Keep your fingers crossed. It seems to have worked for me.

Update2:

Following the same theme, here’s a simpler way if you know a bit about docker. Use this build and then use this image instead of the standard Docker image:

Dockerfile:

FROM brewpi/brewpi-raspbian

# remove git content from base image
RUN rm -rf /var/www/html
RUN rm -rf /home/brewpi

# clone brewpi repositories, legacy branch
RUN git clone --single-branch -b legacy https://github.com/BrewPi/brewpi-script /home/brewpi
RUN git clone --single-branch -b legacy https://github.com/BrewPi/brewpi-www /var/www/html

# set permissions on html directory (redo from base image)
RUN chown -R www-data:www-data /var/www/html; chmod g+s /var/www/html

If anyone is interested, here’s my docker compose file as well.

docker-compose.yml:

version: '2.1'
services:
    brewpi:
        container_name: 'brewpi'
        hostname: 'brewpi'
        #image: 'brewpi/brewpi-raspbian:latest'
        image: 'brewpi-legacy'
        restart: always
        privileged: true
        devices:
            - "/dev/ttyACM0:/dev/ttyACM0"
        volumes:
            - "brewpi-data:/data"     
            - "/etc/timezone:/etc/timezone"
            - "/etc/localtime:/etc/localtime"
        ports:
            - '80:80'
            - '81:81'
            
volumes:            
    brewpi-data:
        driver: local
        driver_opts:
            type: nfs
            o: "addr=stadium,rw,soft,nolock"
            device: ":/your/nfs/share/"

How I re-installed BrewPi legacy software/firmware for Arduino (with serial errors)
#14

If you can’t get this to work, double check your editing, that you hashed out the first line, and altered the link, too.