That's a no-no! The Pi's stock OS comes with software to read the temperature of the CPU, use that instead! https://pimylifeup.com/raspberry-pi-temperature/
that happened to me too actually. you can get a program that tells your cpu temperature even if you're ubuntu, just do some searching.
epic