adafruit / Adafruit-PiTFT-Helper

Script to configure an installed PiTFT
MIT License
82 stars 26 forks source link

Fresh install of stretch reporting errors with addafruit-pitft-helper2.sh #20

Closed bunchc closed 6 years ago

bunchc commented 6 years ago

After following the guidance from this forum post on a fresh install of stretch, the following happens:

pi@node-01:~ $ chmod +x adafruit-pitft-helper2.sh
pi@node-01:~ $ sudo ./adafruit-pitft-helper2.sh
This script downloads and installs
PiTFT Support using userspace touch
controls and a DTO for display drawing.
one of several configuration files.
Run time of up to 5 minutes. Reboot required!

Select configuration:
1. PiTFT 2.4", 2.8" or 3.2" resistive (240x320)
2. PiTFT 2.2" no touch (240x320)
3. PiTFT 2.8" capacitive touch (240x320)
4. PiTFT 3.5" resistive touch (320x480)
5. Quit without installing

SELECT 1-5: 4
Select rotation:
1. 90 degrees (landscape)
2. 180 degrees (portait)
3. 270 degrees (landscape)
4. 0 degrees (portait)

SELECT 1-4: 1
[PITFT] Checking init system...
Found systemd
/boot is mounted
[PITFT] System update
Updating apt indexes...
.........
Reading package lists...
.........
[PITFT] Installing Python libraries & Software...
Installing Pre-requisite Software...This may take a few minutes!
E: Unable to locate package tslib
E: Unable to locate package libts-bin
./adafruit-pitft-helper2.sh: line 144: warning: command not found
./adafruit-pitft-helper2.sh: line 145: pip: command not found
./adafruit-pitft-helper2.sh: line 145: warning: command not found
[PITFT] Exiting due to error: Unable to install software

I can likely work around the 'warning' command issue, however, it doesn't look like tslib and libts-bin are in the stretch repos.

As an aside, 'warning: command not found' is a rather hard thing to google for

dontremember commented 6 years ago

I got pretty much the same problem. I tried executing lines 144 and 145 by hand and got an error message saying "Python.h not found". That was fixed by

sudo apt-get install python-dev

After that, the helper script ran just fine.

bunchc commented 6 years ago

Agreed, mine was failing on finding the tslib packages, which were included in the mirrordirector.raspbian.org repo, which does not look to be included in stretch-lite. This caused the script to dump. I added a check for that and included it in the pull request.

ladyada commented 6 years ago

thx - will also take a look!

dontremember commented 6 years ago

OK, I tried repeating what I did yesterday, and now it's NOT failing... I have no idea what I did differently last night. Today: new install of 2017-11-29-raspbian-stretch.img, set it up to run headless on a pi 0 W, update the packages, run adafruit-pitft-helper2.sh, it finishes properly. The only error message I get now is "no such file or directory" during the build of rpi-fbcp :

Add fbcp to /etc/rc.local... Setting raspi-config to boot to desktop w/o login... sh: 0: getcwd() failed: No such file or directory

That's due to the script going into /tmp/rpi-fbcp-master to build fbcp, then at line 323 that directory is removed without jumping out of it. I guess raspi-config looks to see which directory it's running from, and complains when it comes up empty-handed.

ladyada commented 6 years ago

fixed