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"
  • 1
    You may want to use raspi-config (Internationalisation Options -> Set up language and regional settings) to correct the locale properly. This may require a reboot or a log out and back in again, I'm not sure. – goldilocks Jul 17 '16 at 14:06
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
  • I already have installed wiringpi. Do you havy any other idea how to solve this issue? – dorinand Jul 17 '16 at 14:28
  • No, you must have installed wiringPi in a non-standard way. – joan Jul 17 '16 at 14:37
  • Well, I admit I can't remember how I installed wiringPi. I unninstalled it right now by sudo apt-get --purge remove wiringpi command and install it again by sudo -apt-get install wiringpi. It did not help. – dorinand Jul 17 '16 at 14:59
  • @dorinand My apologies, I thought the man pages were installed as part of the wiringPi package. I've just re-installed myself and they are not. – joan Jul 17 '16 at 15:22
  • It is no problem. Do you have any idea how to solve this ? I can find documentation about gpio on the internet, but I would like to have it reacheable over terminal. – dorinand Jul 17 '16 at 15:43
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.