Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libraries missing for measuing temperature on Raspberry #100

Open
fede2cr opened this issue Aug 23, 2017 · 1 comment
Open

Libraries missing for measuing temperature on Raspberry #100

fede2cr opened this issue Aug 23, 2017 · 1 comment

Comments

@fede2cr
Copy link

fede2cr commented Aug 23, 2017

I was trying to check the Raspberry Pi's temp during the test, but it seems that a couple of libraries are missing from the distribution.

lepidopter@lepidopter:$ /opt/vc/bin/vcgencmd measure_temp
/opt/vc/bin/vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
lepidopter@lepidopter:$ ldd /opt/vc/bin/vcgencmd
linux-vdso.so.1 (0x7ecad000)
libvchiq_arm.so => not found
libvcos.so => not found
libpthread.so.0 => /lib/arm-linux-gnueabi/libpthread.so.0 (0x76f70000)
libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0x76f5d000)
librt.so.1 => /lib/arm-linux-gnueabi/librt.so.1 (0x76f46000)
libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0x76dfc000)
/lib/ld-linux.so.3 (0x54ae7000)

@anadahz
Copy link
Member

anadahz commented Sep 19, 2017

The libraries are there but the PATH for LDLIBRARYPATH is missing.
You can temporarily set the PATH with export:
export LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/vc/lib

To make the changes permanent add the export command to a file in /etc/profile.d/.

In order to run /opt/vc/bin/vcgencmd as lepidopter, you should add the user lepidopter to the video group.


Another way to get the current temperature without using any program is to read the content of the file /sys/class/thermal/thermal_zone0/temp you can pretty print the temperature:

echo $((`cat /sys/class/thermal/thermal_zone0/temp|cut -c1-2`)).$((`cat /sys/class/thermal/thermal_zone0/temp|cut -c3-5`))

Thank you for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants