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
  • 45
  • 1
  • 2
  • 6

3 Answers3

4

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
  • 23,558
  • 5
  • 42
  • 83
4

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
  • 283
  • 1
  • 8
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