2

I would like to configure my gpio pins, but I cannot dipslay documentation over man gpio command. This is the result of command:

man: can't set the locale; make sure $LC_* and $LANG are correct
No manual entry for gpio
See 'man 7 undocumented' for help when manual pages are not available.

Can anybody tell me where is the problem?

> locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY=cs_CZ.UTF-8
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER=cs_CZ.UTF-8
LC_NAME=cs_CZ.UTF-8
LC_ADDRESS=cs_CZ.UTF-8
LC_TELEPHONE=cs_CZ.UTF-8
LC_MEASUREMENT=cs_CZ.UTF-8
LC_IDENTIFICATION=cs_CZ.UTF-8
LC_ALL=

I set LC_ALL by adding a line to .bashrc:

export LC_ALL="en_US.UTF-8"
goldilocks
  • 60,325
  • 17
  • 117
  • 234
dorinand
  • 127
  • 1
  • 4

3 Answers3

5

Presumably the gpio utility is not installed.

The gpio utility is bundled with the wiringPi library.

Install wiringPi (if using Raspbian) with

sudo apt-get install wiringpi

The gpio command should then work.


EDITED TO ADD

My assumption is wrong, the man pages are not installed with the Raspbian wiringPi package.

One work around is

git clone git://git.drogon.net/wiringPi

cd wiringPi

cd gpio

sudo cp gpio.1 /usr/local/man/man1
joan
  • 71,852
  • 5
  • 76
  • 108
4

You should fix the locale and other internationalisation options (using raspi-config and not trying to manually configure). This issue is unrelated to gpio.

gpio was NOT included with Wheezy and required manual installation but was included with Jessie. Unfortunately something in the update process seemed to have removed gpio in full or part as it uninstalled the wiringpi library.

I asked questions about this, but never managed to get a satisfactory answer. https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=148471&p=976588&hilit=+wiringpi#p976588

I "fixed" this with

sudo apt-get purge wiringpi
sudo apt-get install wiringpi

This is preferable to the manual installation procedure, as it will ensure the latest version is installed.

As joan has pointed out the man pages for gpio are not installed by the manual procedure or from the repository, but can be added.

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

$ cd
$ git clone https://github.com/WiringPi/WiringPi.git
$ cd ~/wiringPi
$ ./build