pimoroni / get

Install and helper scripts for Raspbian on the Raspberry Pi
Other
9 stars 7 forks source link

Malfunction when using Get to retrieve grow hat mini installation #217

Open CalebVred opened 10 months ago

CalebVred commented 10 months ago

Hello,

I'm trying to set up the Grow Hat mini on my Raspberry Pi 3 running Rasbian Bookworm. When try to run the install script curl -sSL https://get.pimoroni.com/grow | bash I get feedback about cloning into a repository, etc. but when I look at my home directory all I see is the parent Pimoroni directory with no contents inside and nothing working on my grow hat. Please let me know if you need additional information.

Thanks, Caleb

Gadgetoid commented 10 months ago

Check the permissions of your "Pimoroni" directory, it might (due to a bug in how our installers were set up) have been created as root and not be writable- looking something like this:

ls -hal ~/Pimoroni
drwxrwxr-x  5 root root 4.0K Oct 19 13:29 .
CalebVred commented 10 months ago

Here's the output I got:

ls -hal Pimoroni
total 8.0K
drwxr-xr-x 2 root root 4.0K Dec  5 17:06 .
drwx------ 6  root root 4.0K Dec  5 17:06 ..
fozman2 commented 10 months ago

It might have something to do with how the install script is ran? I ran into the same issue, tried a couple of times with clean Bookworm installs on a Pi Zero 2W, both 32-bit & 64-bit. I kept seeing this in terminal in the output after running the one-line install Script should not be run as root. Try './install.sh'

I also tried one of the manual install options and when running sudo ./install.sh I would get the same Script should not be run as root. Try './install.sh' output

EDIT: Can confirm same issue with 32-bit Bullseye

fozman2 commented 10 months ago

@Gadgetoid I think I may have found the problem, or at least a piece of it.

Line 985 of installers/grow calls for install.sh to be run as root cd $installdir/$gitclonedir && sudo ./install.sh

When install.sh is ran, it runs user_check() and checks to make sure it's not being run as root. Since it is, it exits.

It looks like this change was made to install.sh 3 weeks ago in the Repackage to latest boilerplate. commit.

So this is probably all embroiled in #36 & all the Pi 5 / Python Venv mess?

EDIT: Tested on a Pi Zero 2W running Buster and Python version 2.7.16; If I follow Or... Install and configure dependencies from GitHub: and just omit sudo from sudo ./install.sh it seems to run successfully with only two minor errors;

Grow-monitor still doesn't run on the outdated OS I'm testing with, will test more on a newer OS and Python version.

Gadgetoid commented 10 months ago

Thank you for prodding into this- I've been trying to "move fast and break things" to effect these changes, but I failed at the "move fast" part.

I'm hoping to make the "get" scripts much, much simpler so they just invoke the installer but, indeed, it's another piece of the larger Pi 5 / Venv mess.

I think the bug with install.sh might be related to (if not fixed by) https://github.com/pimoroni/grow-python/pull/37/files

Will aim to roll out those fixes where I can.

craigusus commented 10 months ago

Is there a timeframe for fixing this? I bought a unit for my dad for Christmas. Currently debating returning it if the software isn't working.