Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Installing add-ons suddenly failing? How to update curl's CA store.
#1
Hi all,

I ran into an issue recently whereby I suddenly could not install any plugins at all. The on-screen message was simply 'Installation Failed' regardless of which plugin I chose. I enabled debug logging  and obtained the log, which told me the following :
 
Quote:2021-12-02 08:02:31.132 T:3981439856 ERROR: CCurlFile::FillBuffer - Failed: SSL peer certificate or SSH remote key was not OK(60)
2021-12-02 08:02:31.132 T:3981439856 ERROR: CCurlFile::Open failed with code 0 for https://mirrors.kodi.tv/addons/leia/skin....2.123.zip:
2021-12-02 08:02:31.132 T:3981439856 ERROR: Could not fetch addon location and hash from https://mirrors.kodi.tv/addons/leia/skin....2.123.zip
2021-12-02 08:02:31.132 T:3981439856 ERROR: CAddonInstallJob[skin.amber]: failed to resolve addon install source path

I learnt from this that curl had run into an SSL certificate issue (since clearly it's not using SSH for downloading add-ons). Some trivial web searching told me that the cacerts.pem file on which curl depends for root certificates must have been out of date. Here's what I did to fix that:

1. Download a more recent cacerts.pem from curl's own web site. You can find the URL from the web easily enough, you don't have to trust a random stranger (i.e. me!) to tell you where to find it.
2. Enable SSH on your Kodi install.
3. Log in and change into /etc/ssl to find where your cacerts.pem is stored (in my case it is a soft link to /run/libreelec/cacerts.pem).
4. Rename your existing cacerts.pem to cacerts.pem.old, or just delete it.
5. Use an SFTP client to log into your Kodi install over SSH and copy the new cacerts.pem into the same folder where the old one was located.
6. Profit!

Hope this is useful to anyone else running into this - I am using a relatively recent LibreELEC build of Leia so it's not something that affects only very old installations.

Cheers,

Ian
Reply
#2
A couple of items of follow-up. I wanted to clarify that I am running Kodi v18 (Leia) as part of a libreElec release. I cannot (yet) upgrade Kodi since there is not yet a more recent build of libreElec that supports my hardware, hence ending up with a version of curl that has the problem I've described. The other issue is that, since I am running libreElec from an SD card, the fix I describe is wiped every time I power off/on the box, so I have also added a cron entry to re-copy the updated cacert.pem from persistent storage (/storage) to the relevant location on a daily basis.
Reply
#3
This is a very helpful post. Thanks for tracking down this issue.  Luckily the error message I saw in my log led me here. I'd really been wondering what I broke in my LibreElec/Kodi system when I found I could no longer install new plugins or even update existing one.
Reply

Logout Mark Read Team Forum Stats Members Help
Installing add-ons suddenly failing? How to update curl's CA store.0