2

I've to install the RPI.GPIO library on my raspberry pi 3, on the other hand, I don´t have acess to the internet in this. I'd already download the library in another computer and put this in my USB flash driver. What I don't know is where I put the zip file in my raspberry and what command I've to run to install it. Could someone help me, please?

  • I think Rpi.GPIO is already preinstalled in raspbian jessie, stretch, and buster. So you don't need to installed again. – tlfong01 Sep 27 '19 at 13:43
2

Arguably, the best way is to use the package manager still (downloading the packages manually), because the installation process will keep track of the dependencies for you.

First, you will need to download the package. You can do it either using the browser from http://archive.raspbian.org/raspbian/pool/, or by adding the content of Raspbian's sources.list to another Debian computer and running

sudo apt-get download package-name:armhf

In your specific case, you likely want either

http://archive.raspbian.org/raspbian/pool/main/p/pigpio/python3-pigpio_1.68-4%2Brpi1_all.deb

or

http://archive.raspbian.org/raspbian/pool/main/r/rpi.gpio/python3-rpi.gpio_0.6.5-1_armhf.deb

The links will expire with the next package update, but browsing from the pool/ folder will get you there. The package name is what comes before the underscore, that is python3-pigpio or python3-rpi.gpio.

Either way, you will get a package-name_version.deb which you will need to transfer to the RPi.

On the RPi side, you will need to install the package with

sudo dpkg -i package-name_version.deb
sudo apt-get install -f

There is a chance that the second command will complain about missing dependencies. In that case, note their names, and download the relevant packages as above, then install them too.

  • Hi Dmitry, thanks for your help! – MATHEUS HENRIQUE NASCIMENTO DA Sep 27 '19 at 13:58
  • In which folder do I put de archive? – MATHEUS HENRIQUE NASCIMENTO DA Sep 27 '19 at 14:00
  • It doesn't matter in which folder you put the archive. You have to be in that folder when you run sudo dpkg -i. Alternatively, you can specify the full path to it: sudo dpkg -i /path/to/file.deb – Dmitry Grigoryev Oct 8 '19 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.