Latest download on linux fails with certificate error

A fatal error occurred, and Anki must close. Please report this message on the forums.
Anki 23.10 (51a10f09) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.35
Flags: frz=True ao=False sv=3
Add-ons, last update check: 2023-11-05 08:46:35

Caught exception:
Traceback (most recent call last):
File “aqt.taskman”, line 138, in _on_closures_pending
File “aqt.taskman”, line 82, in
File “aqt.taskman”, line 102, in wrapped_done
File “aqt.sync”, line 105, in on_future_done
File “concurrent.futures._base”, line 439, in result
File “concurrent.futures._base”, line 391, in __get_result
File “concurrent.futures.thread”, line 58, in run
File “aqt.sync”, line 124, in
File “anki.collection”, line 1117, in sync_collection
File “anki._backend_generated”, line 103, in sync_collection
File “anki._backend”, line 152, in _run_command
pyo3_runtime.PanicException: called Result::unwrap() on an Err value: reqwest::Error { kind: Builder, source: Custom { kind: InvalidData, error: “Could not load PEM file "/usr/lib/ssl/certs/ca-certificates.crt": section end "-----END CERTIFICATE-----\rMIIF+TCCA+GgAwIBAgIQRyDQ+oVGGn4XoWQCkYRjdDANBgkqhkiG9w0BAQwFADCB\riDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl\rcnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV\rBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQx\rMDA2MDAwMDAwWhcNMjQxMDA1MjM1OTU5WjB2MQswCQYDVQQGEwJVUzELMAkGA1UE\rCBMCTUkxEjAQBgNVBAcTCUFubiBBcmJvcjESMBAGA1UEChMJSW50ZXJuZXQyMREw\rDwYDVQQLEwhJbkNvbW1vbjEfMB0GA1UEAxMWSW5Db21tb24gUlNBIFNlcnZlciBD\rQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJwb8bsvf2MYFVFRVA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Imem4Gbj1e4ZEzVBhmO55GFfBjRidj26h1oFBHZ7heDH1Bjzw72\rhipu47Gkyfr2NEx3KoCGMLCj3Btx7ASn5Ji8FoU+hCazwOU1VX55mKPU1I2250Lo\rRCASN18JyfsD5PVldJbtyrmz9gn/TKbRXTr80U2q5JhyvjhLf4lOJo/UzL5WCXED\rSmyj4jWG3R7Z8TED9xNNCxGBMXnMete+3PvzdhssvbORDwBZByogQ9xL2LUZFI/i\reoQp0UM/L8zfP527vWjEzuDN5xwxMnhi+vCToh7J159o5ah29mP+aJnvujbXEnGa\rnrNxHzu+AGOePV8hwrGGG7hOIcPDQwkuYwzN/xT29iLp/cqf9ZhEtkGcQcIImH3b\roJ8ifsCnSbu0GB9L06Yqh7lcyvKDTEADslIaeSEINxhO2Y1fmcYFX/Fqrrp1WnhH\rOjplXuXE0OPa0utaKC25Aplgom88L2Z8mEWcyfoB7zKOfD759AN7JKZWCYwk\r-----END CERTIFICATE-----" missing” } }

There’s something wrong with that system file. Please contact your Linux distro for assistance.

Not particularly helpful since that file is built from all the certificates on the system. Is there any way to identify the specific certificate that is missing or incorrect?

I did finally fix this. I followed the following steps:

sudo update-ca-certificates --fresh --verbose

noted a warning about a crt file not containing a single certificate
removed a subdirectory in /usr/local/share/ca-certificates

ran sudo update-ca-certificates --fresh --verbose again
and finally anki launched correctly.

I would proceed with caution if trying this (e.g. copy the subdirectory so you can put it back if it is needed)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.