2

Hi I am currently preparing my project and I intend to use the gpio and I would like to be able to use the wiringpi library but when I try to installing it with

 wget https://project-downloads.drogon.net/wiringpi-latest.deb
 sudo dpkg -i wiringpi-latest.deb

this pop up

(Reading database ... 96083 files and directories currently installed.)
Preparing to unpack wiringpi-latest.deb ...
Unpacking wiringpi:armhf (2.52) over (2.52) ...
dpkg: dependency problems prevent configuration of wiringpi:armhf:
 wiringpi:armhf depends on libc6.

dpkg: error processing package wiringpi:armhf (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.9.4-2) ... Errors were encountered while processing: wiringpi:armhf

what do I do ?

I am using a RPi 4 with raspbian

EDIT

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=====================-=========================-============-==============> ii libc6:arm64 2.31-13+rpt2+rpi1+deb11u2 arm64 GNU C Library:> ii libc6-dbg:arm64 2.31-13+rpt2+rpi1+deb11u2 arm64 GNU C Library:> un libc6-dbgsym <none> <none> (no descriptio> ii libc6-dev:arm64 2.31-13+rpt2+rpi1+deb11u2 arm64 GNU C Library:> un libc6-dev-arm64-cross <none> <none> (no descriptio> un libc6.1-dev <none> <none> (no descriptio> lines 1-11/11 (END) ^C

Grez
  • 25
  • 1
  • 1
  • 5
  • Please [edit] your question and show the output of cat /etc/os-release and dpkg -l '*libc6*'. – Bodo May 02 '22 at 19:51
  • 1
    WiringPi was deprecated in Sept 2019. Raspbian was replaced with RaspiOS in May 2020. So what are you really trying to install. – Dougie May 02 '22 at 20:07
  • @Bodo there you go – Grez May 02 '22 at 23:36
  • @Dougie I want to start learning a little bit of node to help me in my project and in the tutorial that I found the guy used wiringpi to view and edit gpio parameters – Grez May 02 '22 at 23:36
  • Forget WiringPi - while it was very good attempting to use is a waste of time. There are plenty of alternatives https://raspberrypi.stackexchange.com/questions/133251/wiringpi-is-missing-from-bullseye-how-do-i-install-it/133252#133252 – Milliways May 03 '22 at 03:19
  • Tsk, tsk - the negativity in some of these comments... – Seamus May 03 '22 at 05:34
  • So - I have been forced to edit my answer. :) – Seamus May 04 '22 at 04:03

3 Answers3

3

EDIT: wiringpi is now in the apt ports repo; so:

sudo apt install wiringpi

Contrary to some opinions, wiringpi is not a waste of time for everyone. And as long as we are expressing opinions, here's another one to consider: ignore people who make brash pronouncements with no references or supporting documentation. For the record, I have no affiliation with wiringpi - past or present; I'm only a user who happens to feel it's not a waste of time.

That out of the way, here's the wiringpi story in a nutshell: "Gordon", the original author of wiringpi, lost interest in maintaining it a short while ago. Since Gordon's resignation, a team of individuals took on the maintenance of wiringpi, and the wiringpi project has a GitHub site from which they distribute a .deb file that can be downloaded and installed - the links are at the bottom of the page. There are 2 .deb files - one for 32-bit RPi OS & one for 64-bit OS. Perhaps those who feel wiringpi is deprecated should reach out to the project team, and let them know?

I'm currently using the 32-bit version on my RPi 3B+ running bullseye. I'm neither a frequent, nor a demanding GPIO programmer. Most of my GPIO usage is done through the device tree & its overlays, but when I need to drive or read a pin, wiringpi has gotten the job done. I use it for the same reason many people use a software package - it's easy to learn, and it works reliably. In my case the gpio utility (part of wiringpi) suits me because I prefer bash scripting to Python.

Good luck :)

Seamus
  • 21,900
  • 3
  • 33
  • 70
  • thank you for your help :) the links were really usefull – Grez May 03 '22 at 22:18
  • Running sudo apt install wiringpi on Bullsye (32bit), I get the following error Package wiringpi is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source – Wavesailor Jun 22 '22 at 18:18
  • @Wavesailor: That's news... thanks for the update. I did read something recently suggesting that the new team was ready to throw in the towel. However, there may be some good news: Another user has forked the WiringPi repo, and seems to be making a significant effort to keep the code moving forward. Here's the GitHub URL – Seamus Jun 22 '22 at 18:41
3

The question shows different architectures armhf vs. arm64 for the packages.

dpkg: dependency problems prevent configuration of wiringpi:armhf:
 wiringpi:armhf depends on libc6.
          ^^^^^
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version                   Architecture Description
+++-=====================-=========================-============-==============>
ii  libc6:arm64           2.31-13+rpt2+rpi1+deb11u2 arm64        GNU C Library:>
          ^^^^^

Apparently you try to install a 32-bit package on a 64-bit system.

In Seamus' answer there is some useful information which might get overlooked in the longer text telling opinion and explanation about the wiringpi project.

The wiringpi project has a GitHub site from which they distribute a .deb file that can be downloaded and installed - the links are at the bottom of the page. There are 2 .deb files - one for 32-bit RPi OS & one for 64-bit OS.

On the Releases page of this GitHub project you can see two versions of the package:

  • wiringpi-2.61-1-arm64.deb
  • wiringpi-2.61-1-armhf.deb

Try to purge the armhf version and install the arm64 version.

Bodo
  • 253
  • 1
  • 7
2

This worked for me

cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb

Then to check it is working:

gpio -v
Wavesailor
  • 121
  • 3