adafruit / Raspberry-Pi-Installer-Scripts

380 stars 158 forks source link

adafruit-pitft.sh: "Unable to locate package python-spidev" in Buster Lite #75

Closed 9V1LH closed 4 years ago

9V1LH commented 4 years ago

I'm using Raspbian Buster Lite, release date 2020-02-13

[PITFT] Installing Python libraries & Software... Installing Pre-requisite Software...This may take a few minutes! E: Unable to locate package python-spidev WARNING : Apt failed to install software!

ladyada commented 4 years ago

make sure you have internet connectivity and are running python3

9V1LH commented 4 years ago

I haven't installed python3, but this quick and dirty workaround did the trick for me:

$sudo apt install -y python-pip $pip install spidev

Then I removed "python-pip" from line 199 and run the script

ladyada commented 4 years ago

ok thanks! not sure why only you had this issue (we have lots of folks use this code :)

richburdon commented 4 years ago

I have the same issue and @9V1LH 's fix didn't work (pip installed spidev ok, but rerunning the original command still fails).

aanrudolph2 commented 3 years ago

Seeing the same issue as OP. I'm running Ubuntu 20.10; apt-get couldn't find python-spidev when I ran it manually.

Additionally, the overlays folder in Ubuntu are in a different location: /boot/firmware/overlays. For now I can get it working by altering the script. I am intentionally not opening an issue because I realize this may not be supported.

tbjers commented 2 years ago

I ran into this issue as well on Rasbian Buster (though on a Kiwix image, which I think is based on Pi OS Lite), and for me the way to fix this was to completely replace the contents of /etc/apt/sources.list with the following:

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb http://archive.raspberrypi.org/debian/ buster main

# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

And wipe my cache by running:

$ rm -Rf /var/cache/apt

Then rerun the commands to update the Pi:

$ sudo apt update -y && sudo apt upgrade -y

If you've got a weird custom image like a Kiwix, be sure to not overwrite /etc/dnsmasq.conf if prompted because that'll break the hotspot functionality.