Caustic
Posts: 8
Joined: Fri Jun 07, 2013 4:31 am

Installing RPi.GPIO

Tue Dec 31, 2013 10:33 pm

Hey all.

I'm trying to follow this tutorial to get a PiGlow addon for XBMC working but I've run into a problem.
I can get the PiGlow working on a Raspbian install quite easily but I can't install RPi.GPIO when using Raspbmc.

When trying to do:
sudo apt-get update
sudo apt-get -y install python-rpi.gpio

I get an error that says:
E: Unable to locate package python-rpi.gpio
E: Couldn't find any package by regex 'python-rpi.gpio'

As I understand RPi.GPIO is included in Raspbian as default but not in Raspbmc. I guess the package has been removed from the repository or something? I'm not totally clear on how that works.

So can anyone help? Maybe there's another way to install it?

Thanks.

User avatar
DougieLawson
Posts: 39786
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Installing RPi.GPIO

Tue Dec 31, 2013 10:51 pm

update /etc/apt/sources.list.d/ with a temporary definition for the Raspbian wheezy repo.
or grab a copy of the *.deb and install it with dpkg -i python-rpi.gpio*.deb
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

User avatar
croston
Posts: 711
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: Installing RPi.GPIO

Tue Dec 31, 2013 10:59 pm

Did you do a:

Code: Select all

$ sudo apt-get update
before you did the apt-get install?

Caustic
Posts: 8
Joined: Fri Jun 07, 2013 4:31 am

Re: Installing RPi.GPIO

Tue Dec 31, 2013 11:33 pm

Yes I have done an update but Doug's answer makes sense to me so I'll try one or both of those.

Thank you both.

Caustic
Posts: 8
Joined: Fri Jun 07, 2013 4:31 am

Re: Installing RPi.GPIO

Wed Jan 01, 2014 1:40 am

Just to note that I did get it working. No idea why I couldn't download it using apt-get but never mind.

I grabbed a tar.gz of RPi.GPIO from the Python website and just transferred that to my Pi. Had to install gcc to get the install script to work but once it did all was well.

Thanks.

Return to “Troubleshooting”