wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

[SOLVED]vcgencmd not working

Sun Nov 06, 2016 8:03 pm

Today I tried to check the temp on my B+ running
Host: raspberrypiB Kernel: 4.4.26+ armv6l (32 bit) Console: tty 0
Distro: Raspbian GNU/Linux 8
and got:

Code: Select all

sudo vcgencmd measure_temp
sudo: vcgencmd: command not found
. It was OK at the first of Oct. Has something moved/changed in the recent updates?
Last edited by wh7qq on Fri Nov 11, 2016 4:13 pm, edited 1 time in total.

jahboater
Posts: 2851
Joined: Wed Feb 04, 2015 6:38 pm

Re: vcgencmd not working

Sun Nov 06, 2016 8:07 pm

Why use sudo?

Code: Select all

[email protected]:~ $ vcgencmd measure_temp
temp=34.3'C
[email protected]:~ $ which vcgencmd
/usr/bin/vcgencmd
[email protected]:~ $ 
Have you lost "/usr/bin" from your $PATH environment variable?
Try "echo $PATH" and see if /usr/bin is included.

User avatar
DougieLawson
Posts: 33603
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: vcgencmd not working

Sun Nov 06, 2016 9:05 pm

You can build it from source if it isn't included with your distro.

cd /tmp
git clone https://github.com/raspberrypi/userland
cd userland
./buildme
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

Re: vcgencmd not working

Fri Nov 11, 2016 3:39 am

@DougieLawson: vcgencmd did not exist anymore on this B+ although I had used it previously. There were no installation candidtates for it shown by apt-get policy so I followed your instructions, which failed due to cmake not being present. So I added cmake and after over 1/2 hr of compilation on the B+, I still get

Code: Select all

$ apt-cache policy vcgencmd
N: Unable to locate package vcgencmd
Wild goose chase. Maybe I need a fresh install because something surely got fu'd by a recent update. So far, all the time and effort not worth the time.

User avatar
rpdom
Posts: 12737
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: vcgencmd not working

Fri Nov 11, 2016 5:54 am

vcgencmd is part of the libraspberrypi-bin package.

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

Re: vcgencmd not working

Fri Nov 11, 2016 8:36 am

And that package is indeed installed but something got screwed up in a recent update.

Code: Select all

apt-cache policy libraspberrypi-bin
libraspberrypi-bin:
  Installed: 1.20161020-1
  Candidate: 1.20161020-1
  Version table:
 *** 1.20161020-1 0
        500 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages
        100 /var/lib/dpkg/status

Code: Select all

$ apt-cache policy vcgencmd
N: Unable to locate package vcgencmd
It worked on the B+ previously, it works on this RPi 3 now but it is gone from the B+. I am not going to screw around with it further...just do a fresh install. Other than some simple cron commands, nothing of great import is stored on that machine and my time is worth more than my curiosity.

User avatar
rpdom
Posts: 12737
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: vcgencmd not working

Fri Nov 11, 2016 8:47 am

wh7qq wrote:And that package is indeed installed but something got screwed up in a recent update.

Code: Select all

$ apt-cache policy vcgencmd
N: Unable to locate package vcgencmd
That is the output I would expect. There is no package called "vcgencmd", so apt-cache will never find it.

If librapberrypi-bin is installed correctly, then vcgencmd should be present

Code: Select all

[email protected]:~ $ which vcgencmd
/usr/bin/vcgencmd
[email protected]:~ $ ls -l /usr/bin/vcgencmd
lrwxrwxrwx 1 root root 20 Oct 24 13:04 /usr/bin/vcgencmd -> /opt/vc/bin/vcgencmd
[email protected]:~ $ ls -l /opt/vc/bin/vcgencmd
-rwxr-xr-x 1 root root 15176 Sep 22 09:07 /opt/vc/bin/vcgencmd
[email protected]:~ $ apt-cache policy libraspberrypi-bin
libraspberrypi-bin:
  Installed: 1.20161020-1
  Candidate: 1.20161020-1
  Version table:
 *** 1.20161020-1 0
        500 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages
        100 /var/lib/dpkg/status
If it isn't there, reinstall the package

Code: Select all

apt-get --reinstall install libraspberrypi-bin

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

[Re: vcgencmd not working

Fri Nov 11, 2016 4:12 pm

Thank you, that got it. I wonder how it happened and how to keep it from happening again...maybe a mystery I'll never know.

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 53 guests