Errors updating package cache

I’m attempting to create a snap for a search application I like. After creating the .yaml file, I tried to run snapcraft and got this error:

Failed to update the package cache: Some files could not be downloaded:

E:The method driver /snap/snapcraft/1871/usr/lib/apt/methods/https could not be found.
W:Is the package apt-transport-https installed?
E:The method driver /snap/snapcraft/1871/usr/lib/apt/methods/https could not be found.
W:Is the package apt-transport-https installed?
E:Failed to fetch https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease  
E:Failed to fetch https://s3-us-west-2.amazonaws.com/brave-apt/dists/artful/InRelease  
E:Some index files failed to download. They have been ignored
or old ones used instead.

Check that the sources on your host are configured correctly.

FYI, I have no prior programming experience. The snap process looked deceptively simple. :smiley:.

I installed this package, but the error still appeared.

Refer Bug #1790819 “snapcraft 2.43 snap can’t access to HTTPS APT sour…” : Bugs : Snapcraft, this is due to the fact that the snap distribution of snapcraft itself doesn’t include the apt-transport-https package, and your APT sources contains HTTPS source.

Please switch to the candidate channel of the snapcraft snap:

sudo snap refresh --channel=candidate snapcraft

That fixed that problem. Thanks.