How to get working wiringPi on Raspbian

Clone git:

git clone

Goto BPI-WiringPi2 directory:

cd BPI-WiringPi2

Ensure build is executable:

chmod +x ./build

Run compile and install process:


Make sure build success:

which gpio

You should see:


Now link the /usr/local/bin/gpio into /usr/bin/gpio

sudo ln -s /usr/local/bin/gpio /usr/bin/gpio

Now run:

gpio readall

You’ll see the table:

Voila! Now you can work with gpio on M2U!

1 Like