5

I get the following when trying to install wiring pi on a fresh bullseye image. Anyone have any way to get it installed?

 $ sudo apt-get install wiringpi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package wiringpi
user1816847
  • 153
  • 1
  • 1
  • 4

2 Answers2

6

Wiringpi is deprecated.

You may be able to install the last release from the author's website which may or may not work on Bullseye.

There are a few alternative libraries.

See Controlling Raspberry Pi GPIO with c and Python

Command line tools

GPIOreadall is a python replacement for the wiringpi gpio readall utility.

raspi-gpio designed to help hack / debug GPIO (included in Raspberry Pi OS) which is used by GPIOreadall also allows command line access. I am unaware of any documentation but raspi-gpio help describes usage.

The new gpiochip libgpiod interface has a couple of command line tools. NOTE the Bullseye implementation has a few bugs.

Frankly if you REALLY want to use command line install pigpio (which should be installed in Raspberry Pi OS) and use pigs.

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • OH! good to know! are there console alternatives or should I just be using some PL and libraries? – user1816847 Nov 13 '21 at 21:56
  • I did install wiringpi on pi bullseye and it worked like it was expected. I have yet to install wiringpi on Bookworm and soon I am going to try. :) – ThN Nov 08 '23 at 18:46
4

I was successful with "Rasberry PI OS Bullseye" using this fork:

https://github.com/WiringPi/WiringPi

cd /tmp
wget https://github.com/WiringPi/WiringPi/releases/download/2.61-1/wiringpi-2.61-1-armhf.deb
sudo dpkg -i wiringpi-2.61-1-armhf.deb

Test

sudo gpio -g mode 19 out sudo gpio -g write 19 1

If you have 64 bit you probably need to wget "wiringpi-2.61-1-arm64.deb" instead. Also, see https://github.com/WiringPi/WiringPi/releases where you can find all release versions.

fishbone
  • 151
  • 1
  • 1
  • 5
  • 1
    This ought to be the marked answer. Yes, it may be deprecated and have alternatives but OP asked about installing it on Bullseye, not if it was deprecated and what alternatives are available for it. It could be a 3rd party dependency or something else that can't be changed, so the above answer might not help at all in the context of the question. Adding all of that info as additional context might make sense, instead. – Ani Jul 05 '23 at 19:41