Certificate verify failed

I’ve been trying to upgrade my Docker image with some newer packages (not Python 3 yet). I’m building on top of balenalib/rpi-raspbian and I’ve had to add a few extra packages that I didn’t need to install with the old resin/rpi-raspbian image. I’ve got the build completing successfully, but I get this error when I start Mopidy.

ERROR    Error during Last.fm setup: NetworkError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)

What am I missing? I’ve got the latest apt install ca-certificates and pip install certifi.


I worked it out. You have to run:

update-ca-certificates --fresh