I followed the tutorial, and when I run snapcraft (using the tutorial .yaml file), I get the following error:
Traceback (most recent call last):
File "/snap/snapcraft/10279/bin/snapcraft", line 5, in <module>
from snapcraft.cli import run
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/cli.py", line 35, in <module>
from snapcraft.remote import RemoteBuildError
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/remote/__init__.py", line 29, in <module>
from .git import (
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/remote/git.py", line 27, in <module>
import pygit2
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/__init__.py", line 275, in <module>
settings = Settings()
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/settings.py", line 55, in __init__
self._initialize_tls_certificate_locations()
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/settings.py", line 61, in _initialize_tls_certificate_locations
self.set_ssl_cert_locations(
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/settings.py", line 191, in set_ssl_cert_locations
option(_pygit2.GIT_OPT_SET_SSL_CERT_LOCATIONS, cert_file, cert_dir)
_pygit2.GitError: OpenSSL error: failed to load certificates: error:00000000:lib(0)::reason(0)
I am using Arch, snapd was installed from the AUR.
Any assistence is appreciated.
Edit: I get this error running snapcraft even if there is no .yaml file.
I also tried using the edge version of snapcraft, and got the same error.
[nasanbat@localhost bin]$ snapcraft
Traceback (most recent call last):
File "/snap/snapcraft/10279/bin/snapcraft", line 5, in <module>
from snapcraft.cli import run
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/cli.py", line 35, in <module>
from snapcraft.remote import RemoteBuildError
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/remote/__init__.py", line 29, in <module>
from .git import (
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/remote/git.py", line 27, in <module>
import pygit2
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/__init__.py", line 275, in <module>
settings = Settings()
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/settings.py", line 55, in __init__
self._initialize_tls_certificate_locations()
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/settings.py", line 61, in _initialize_tls_certificate_locations
self.set_ssl_cert_locations(
File "/var/lib/snapd/snap/snapcraft/10279/lib/python3.10/site-packages/pygit2/settings.py", line 191, in set_ssl_cert_locations
option(_pygit2.GIT_OPT_SET_SSL_CERT_LOCATIONS, cert_file, cert_dir)
_pygit2.GitError: OpenSSL error: failed to load certificates: error:00000000:lib(0)::reason(0)
Sorry about this error, we switched to using the pygit2 library in snapcraft 8 and are working through some rough edges.
As a workaround, you should be able to use snapcraft from the 7.x channel (snap install snapcraft --channel=7.x/stable) because it doesn’t use the pygit2 library.