[Solution] Failed to install wiringpi on Raspberry Pi 4B, gpio -v and gpio readall commands not found (arm64 architecture)

Problem Description

Raspberry Pi information:#4B# #64位# #aarch#

  1. cmmand not foung is displayed when using the gpio -vor commandgpio readall
  2. After installing RPi.GPIO (installation command: pip install RPi.GPIO), you still cannot use the above command.
  3. After installing wiringpi, an error is reportedwiringpi:armhf

Cause Analysis:

The 64-bit Raspberry Pi cannot directly use pip install wiringpithe command to install wiringpi, otherwise the installation will be incompatible with the armhf architecture.


solution:

  1. Completely uninstall the incorrectly installed wiringpi
sudo apt-get remove wiringpi
sudo apt-get purge wiringpi
hash -r
  1. Install the wiringpi version suitable for 64-bit ARM architecture
sudo apt-get update
sudo apt-get install git-core
git clone https://github.com/WiringPi/WiringPi.git
cd WiringPi
./build

不必担心连不上github,因为安装了git-core包可以直接克隆代码库

Guess you like

Origin blog.csdn.net/Taylor_Kurt/article/details/133185314