skip to Main Content

I have installed all required items on Debian 11.
I have followed the procedures listed at the official docs.

Here’s the output that I get after creating a valid snapcraft.yaml:

$ snapcraft
Launching a VM.
Project base changed from 'core18' to 'core20', cleaning first.
Name:           snapcraft-cyapass
State:          Running
IPv4:           10.91.188.130
Release:        Ubuntu 18.04.6 LTS
Image hash:     24c87304639a (Ubuntu 18.04 LTS)
CPU(s):         2
Load:           0.01 0.02 0.06
Disk usage:     1.4GiB out of 248.0GiB
Memory usage:   54.8MiB out of 1.9GiB
Mounts:         --
Launched: snapcraft-cyapass
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,463 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [385 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [23.6 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [5,504 B]
Get:8 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [2,210 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [309 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [885 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [185 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [970 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal/main Translation-en [506 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [22.0 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal/restricted Translation-en [6,212 B]
Get:18 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8,628 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5,124 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,851 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [468 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [25.8 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [7,484 B]
Get:24 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [2,327 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [325 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,116 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [267 kB]
Fetched 29.9 MB in 6s (4,998 kB/s)                          
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-image-5.4.0-163-generic linux-modules-5.4.0-163-generic
The following packages will be upgraded:
  linux-image-virtual linux-libc-dev
2 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.6 MB of archives.
After this operation, 92.5 MB of additional disk space will be used.
Get:1 http://security.ubuntu.com/ubuntu focal-security/main amd64 linux-modules-5.4.0-163-generic amd64 5.4.0-163.180 [15.0 MB]
Get:2 http://security.ubuntu.com/ubuntu focal-security/main amd64 linux-image-5.4.0-163-generic amd64 5.4.0-163.180 [10.5 MB]
Get:3 http://security.ubuntu.com/ubuntu focal-security/main amd64 linux-image-virtual amd64 5.4.0.163.160 [2,576 B]
Get:4 http://security.ubuntu.com/ubuntu focal-security/main amd64 linux-libc-dev amd64 5.4.0-163.180 [1,111 kB]
Fetched 26.6 MB in 2s (11.6 MB/s)               
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package linux-modules-5.4.0-163-generic.
(Reading database ... 19113 files and directories currently installed.)
Preparing to unpack .../linux-modules-5.4.0-163-generic_5.4.0-163.180_amd64.deb ...
Unpacking linux-modules-5.4.0-163-generic (5.4.0-163.180) ...
Selecting previously unselected package linux-image-5.4.0-163-generic.
Preparing to unpack .../linux-image-5.4.0-163-generic_5.4.0-163.180_amd64.deb ...
Unpacking linux-image-5.4.0-163-generic (5.4.0-163.180) ...
Preparing to unpack .../linux-image-virtual_5.4.0.163.160_amd64.deb ...
Unpacking linux-image-virtual (5.4.0.163.160) over (5.4.0.162.159) ...
Preparing to unpack .../linux-libc-dev_5.4.0-163.180_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.4.0-163.180) over (5.4.0-162.179) ...
Setting up linux-libc-dev:amd64 (5.4.0-163.180) ...
Setting up linux-modules-5.4.0-163-generic (5.4.0-163.180) ...
Setting up linux-image-5.4.0-163-generic (5.4.0-163.180) ...
I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-163-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.4.0-163-generic
Setting up linux-image-virtual (5.4.0.163.160) ...
Processing triggers for linux-image-5.4.0-163-generic (5.4.0-163.180) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-163-generic
W: Couldn't identify type of root file system for fsck hook
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/40-force-partuuid.cfg'
Sourcing file `/etc/default/grub.d/50-builddimg-settings.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
GRUB_FORCE_PARTUUID is set, will attempt initrdless boot
Found linux image: /boot/vmlinuz-5.4.0-163-generic
Found initrd image: /boot/initrd.img-5.4.0-163-generic
Found linux image: /boot/vmlinuz-5.4.0-162-generic
Found initrd image: /boot/initrd.img-5.4.0-162-generic
Adding boot menu entry for UEFI Firmware Settings
done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,704 B of archives.
After this operation, 162 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.9 [1,704 B]
Fetched 1,704 B in 0s (5,841 B/s)               
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package apt-transport-https.
(Reading database ... 20374 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.0.9_all.deb ...
Unpacking apt-transport-https (2.0.9) ...
Setting up apt-transport-https (2.0.9) ...
2023-09-19T14:31:52-04:00 INFO Waiting for automatic snapd restart...
snapd 2.60.3 from Canonical✓ installed
core20 20230801 from Canonical✓ installed
"core20" switched to the "latest/stable" channel

snapcraft 7.5.2 from Canonical✓ installed
"snapcraft" switched to the "latest/stable" channel

Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Reading package lists... Done
Installing build dependencies: git unzip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  git-man libasn1-8-heimdal libbrotli1 libcurl3-gnutls liberror-perl
  libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal
  libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2
  libldap-common libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2
  libsasl2-modules-db libssh-4 libwind0-heimdal
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-cvs git-mediawiki git-svn zip
Recommended packages:
  less publicsuffix libsasl2-modules
The following NEW packages will be installed:
  git git-man libasn1-8-heimdal libbrotli1 libcurl3-gnutls liberror-perl
  libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal
  libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2
  libldap-common libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2
  libsasl2-modules-db libssh-4 libwind0-heimdal unzip
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,592 kB of archives.
After this operation, 45.7 MB of additional disk space will be used.
Get:1 http://security.ubuntu.com/ubuntu focal-security/main amd64 libbrotli1 amd64 1.0.7-6ubuntu0.1 [267 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libpsl5 amd64 0.21.0-1ubuntu1 [51.5 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security/main amd64 libroken18-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [42.5 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security/main amd64 libasn1-8-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [181 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 libheimbase1-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [30.4 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 libhcrypto4-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [88.1 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 libwind0-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [47.7 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 libhx509-5-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [107 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 libkrb5-26-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [207 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2build1 [54.9 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main amd64 libheimntlm0-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [15.1 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/main amd64 libgssapi3-heimdal amd64 7.7.0+dfsg-1ubuntu1.4 [96.5 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg-2ubuntu0.1 [14.7 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/main amd64 libsasl2-2 amd64 2.1.27+dfsg-2ubuntu0.1 [49.3 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/main amd64 libldap-common all 2.4.49+dfsg-2ubuntu1.9 [16.6 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/main amd64 libldap-2.4-2 amd64 2.4.49+dfsg-2ubuntu1.9 [155 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/main amd64 libnghttp2-14 amd64 1.40.0-1ubuntu0.1 [78.5 kB]
Get:18 http://security.ubuntu.com/ubuntu focal-security/main amd64 libssh-4 amd64 0.9.3-2ubuntu2.3 [170 kB]
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 libcurl3-gnutls amd64 7.68.0-1ubuntu2.19 [233 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 liberror-perl all 0.17029-1 [26.5 kB]
Get:21 http://security.ubuntu.com/ubuntu focal-security/main amd64 git-man all 1:2.25.1-1ubuntu3.11 [887 kB]
Get:22 http://security.ubuntu.com/ubuntu focal-security/main amd64 git amd64 1:2.25.1-1ubuntu3.11 [4,605 kB]
Get:23 http://security.ubuntu.com/ubuntu focal-security/main amd64 unzip amd64 6.0-25ubuntu1.1 [168 kB]
Fetched 7,592 kB in 1s (9,688 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpsl5:amd64.
(Reading database ... 20378 files and directories currently installed.)
Preparing to unpack .../00-libpsl5_0.21.0-1ubuntu1_amd64.deb ...
Unpacking libpsl5:amd64 (0.21.0-1ubuntu1) ...
Selecting previously unselected package libbrotli1:amd64.
Preparing to unpack .../01-libbrotli1_1.0.7-6ubuntu0.1_amd64.deb ...
Unpacking libbrotli1:amd64 (1.0.7-6ubuntu0.1) ...
Selecting previously unselected package libroken18-heimdal:amd64.
Preparing to unpack .../02-libroken18-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb ..
.
Unpacking libroken18-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libasn1-8-heimdal:amd64.
Preparing to unpack .../03-libasn1-8-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb ...
Unpacking libasn1-8-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libheimbase1-heimdal:amd64.
Preparing to unpack .../04-libheimbase1-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb 
...
Unpacking libheimbase1-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libhcrypto4-heimdal:amd64.
Preparing to unpack .../05-libhcrypto4-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb .
..
Unpacking libhcrypto4-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libwind0-heimdal:amd64.
Preparing to unpack .../06-libwind0-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb ...
Unpacking libwind0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libhx509-5-heimdal:amd64.
Preparing to unpack .../07-libhx509-5-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb ..
.
Unpacking libhx509-5-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libkrb5-26-heimdal:amd64.
Preparing to unpack .../08-libkrb5-26-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb ..
.
Unpacking libkrb5-26-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libheimntlm0-heimdal:amd64.
Preparing to unpack .../09-libheimntlm0-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb 
...
Unpacking libheimntlm0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libgssapi3-heimdal:amd64.
Preparing to unpack .../10-libgssapi3-heimdal_7.7.0+dfsg-1ubuntu1.4_amd64.deb ..
.
Unpacking libgssapi3-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../11-libsasl2-modules-db_2.1.27+dfsg-2ubuntu0.1_amd64.deb 
...
Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg-2ubuntu0.1) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../12-libsasl2-2_2.1.27+dfsg-2ubuntu0.1_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27+dfsg-2ubuntu0.1) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../13-libldap-common_2.4.49+dfsg-2ubuntu1.9_all.deb ...
Unpacking libldap-common (2.4.49+dfsg-2ubuntu1.9) ...
Selecting previously unselected package libldap-2.4-2:amd64.
Preparing to unpack .../14-libldap-2.4-2_2.4.49+dfsg-2ubuntu1.9_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.9) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../15-libnghttp2-14_1.40.0-1ubuntu0.1_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.40.0-1ubuntu0.1) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../16-librtmp1_2.4+20151223.gitfa8646d.1-2build1_amd64.deb 
...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build1) ...
Selecting previously unselected package libssh-4:amd64.
Preparing to unpack .../17-libssh-4_0.9.3-2ubuntu2.3_amd64.deb ...
Unpacking libssh-4:amd64 (0.9.3-2ubuntu2.3) ...
Selecting previously unselected package libcurl3-gnutls:amd64.
Preparing to unpack .../18-libcurl3-gnutls_7.68.0-1ubuntu2.19_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.68.0-1ubuntu2.19) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../19-liberror-perl_0.17029-1_all.deb ...
Unpacking liberror-perl (0.17029-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../20-git-man_1%3a2.25.1-1ubuntu3.11_all.deb ...
Unpacking git-man (1:2.25.1-1ubuntu3.11) ...
Selecting previously unselected package git.
Preparing to unpack .../21-git_1%3a2.25.1-1ubuntu3.11_amd64.deb ...
Unpacking git (1:2.25.1-1ubuntu3.11) ...
Selecting previously unselected package unzip.
Preparing to unpack .../22-unzip_6.0-25ubuntu1.1_amd64.deb ...
Unpacking unzip (6.0-25ubuntu1.1) ...
Setting up libpsl5:amd64 (0.21.0-1ubuntu1) ...
Setting up unzip (6.0-25ubuntu1.1) ...
Setting up libbrotli1:amd64 (1.0.7-6ubuntu0.1) ...
Setting up libnghttp2-14:amd64 (1.40.0-1ubuntu0.1) ...
Setting up libldap-common (2.4.49+dfsg-2ubuntu1.9) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-2ubuntu0.1) ...
Setting up liberror-perl (0.17029-1) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build1) ...
Setting up libsasl2-2:amd64 (2.1.27+dfsg-2ubuntu0.1) ...
Setting up libssh-4:amd64 (0.9.3-2ubuntu2.3) ...
Setting up libroken18-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up git-man (1:2.25.1-1ubuntu3.11) ...
Setting up libheimbase1-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libasn1-8-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libhcrypto4-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libwind0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libhx509-5-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libkrb5-26-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libheimntlm0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libgssapi3-heimdal:amd64 (7.7.0+dfsg-1ubuntu1.4) ...
Setting up libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.9) ...
Setting up libcurl3-gnutls:amd64 (7.68.0-1ubuntu2.19) ...
Setting up git (1:2.25.1-1ubuntu3.11) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for mime-support (3.64ubuntu1) ...
git set to automatically installed.
unzip set to automatically installed.
snapd is not logged in, snap install commands will use sudo
node (20/stable) 20.7.0 from OpenJS Foundation (iojs✓) installed
Get:1 libnss3_3.49.1-1ubuntu1.9_amd64.deb [1256 kB]                            
Fetched 1256 kB in 0s (0 B/s)                                                  
Get:1 libnspr4_4.25-1_amd64.deb [107 kB]                                       
Fetched 107 kB in 0s (0 B/s)                                                   
Pulling electron-quick-start 
+ snapcraftctl pull
Cloning into '/root/parts/electron-quick-start/src'...
remote: Enumerating objects: 549, done.
remote: Counting objects: 100% (164/164), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 549 (delta 87), reused 108 (delta 86), pack-reused 385
Receiving objects: 100% (549/549), 1.74 MiB | 5.82 MiB/s, done.
Resolving deltas: 100% (326/326), done.
Building electron-quick-start 
+ npm install electron electron-packager
node: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by node)
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by node)
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by node)
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by node)
Failed to run 'override-build': Exit code was 1.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

I ran the command again with the --debug option and I got the following:

Launching a VM.
snap "snapd" has no updates available
Skipping pull electron-quick-start (already ran)
Building electron-quick-start 
+ npm install electron electron-packager
node: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by node)
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by node)
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by node)
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by node)
Failed to run 'override-build': Exit code was 1.

Supposedly the way to resolve that is by running:
$ sudo apt install build-essential

However, when I run that install I get a message stating that those packages are already installed.

Electron Build Snap

I’ve also followed all the docs at ElecronJS to create the snap but those all fail also.

I’ve also tried on Debian 11, Ubuntu 22.04 and an older version of Lubuntu but the package is never built.

Is it currently possible to build a snap? Why is building a snap so process heavy now that it requires a virtual machine to be installed to create the package?

Snapcraft.yaml For My Project

name: cyapass # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '1.44' # just for humans, typically '1.2+git' or '1.3.2'
summary: Never type, memorize or make up a password again # 79 char long summary
description: |
  With CYaPass your passwords are never stored anywhere.
  They're generated every time.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

apps:
  electron-packager-cyapass:
    command: cyapass/cyapass --no-sandbox
    # extensions: [gnome-4-29]
    plugs:
    - browser-support
    - network
    - network-bind
    environment:
      # Correct the TMPDIR path for Chromium Framework/Electron to ensure
      # libappindicator has readable resources.
      TMPDIR: $XDG_RUNTIME_DIR

parts:
  electron-quick-start:
    plugin: nil
    source: https://github.com/raddevus/CYaPass-Electron.git
    override-build: |
        npm install electron electron-packager
        npx electron-packager . --overwrite --platform=linux --output=release-build --prune=true
        cp -rv ./cyapass-* $SNAPCRAFT_PART_INSTALL/cyapass
    build-snaps:
    - node/20/stable
    build-packages:
    - unzip
    stage-packages:
    - libnss3
    - libnspr4

What I’ve Tried

I changed the core20 in the above yaml to core18 and I changed the node/20/stable to node/18/stable and rebuilt it.

Rebuild — Got Much Further, But Failed
Here’s the additional things the build ran…

Pulling electron-quick-start 
+ snapcraftctl pull
Cloning into '/root/parts/electron-quick-start/src'...
remote: Enumerating objects: 549, done.
remote: Counting objects: 100% (164/164), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 549 (delta 87), reused 108 (delta 86), pack-reused 385
Receiving objects: 100% (549/549), 1.74 MiB | 5.75 MiB/s, done.
Resolving deltas: 100% (326/326), done.
Building electron-quick-start 
+ npm install electron electron-packager
npm WARN deprecated [email protected]: Please use @electron/asar moving forward.  There is no API change, just a package name change
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1

added 522 packages, and audited 523 packages in 22s

79 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice 
npm notice New major version of npm available! 9.8.1 -> 10.1.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.1.0
npm notice Run npm install -g [email protected] to update!
npm notice 
+ npx electron-packager . --overwrite --platform=linux --output=release-build --prune=true
Packaging app for platform linux x64 using electron v26.2.1
Wrote new app to: /root/parts/electron-quick-start/build/CYaPass-linux-x64
+ cp -rv ./cyapass-* /root/parts/electron-quick-start/install/cyapass
cp: cannot stat './cyapass-*': No such file or directory
Failed to run 'override-build': Exit code was 1.

Now, I’ve rebuilt it again with the –debug option and now I see the following:

found 0 vulnerabilities
+ npx electron-packager . --overwrite --platform=linux --output=release-build --prune=true
Packaging app for platform linux x64 using electron v26.2.1
Wrote new app to: /root/parts/electron-quick-start/build/CYaPass-linux-x64
+ cp -rv ./cyapass-* /root/parts/electron-quick-start/install/cyapass
cp: cannot stat './cyapass-*': No such file or directory
Failed to run 'override-build': Exit code was 1.
snapcraft-cyapass #

Notice that the last line is a new prompt of the VM that was running the snap build.

I can see this error seems to indicate that it cannot find the .cyapass-* directory.

I browsed around and I think it’s attempting to actually copy the output of the project directory.
I will change the yaml and rebuild and see what happens.

2

Answers


  1. Chosen as BEST ANSWER

    I was finally able to build my Snap package again.

    I'll explain :

    1. The root cause of the problem
    2. The solution

    I had changed my packager from electron-builder to forge.

    That meant my devDependencies (in package.json) changed to look like the following:

    "devDependencies": {
        "@electron-forge/cli": "^6.4.1",
        "@electron-forge/maker-deb": "^6.4.1",
        "@electron-forge/maker-rpm": "^6.4.1",
        "@electron-forge/maker-squirrel": "^6.4.1",
        "@electron-forge/maker-zip": "^6.4.1",
        "@electron-forge/maker-snap": "^6.4.1",
        "@electron-forge/plugin-auto-unpack-natives": "^6.4.1",
        "electron": "^26.2.1",
      },
    

    Forge works great for building the deb, rpm, zip, dmg packages, but fails when trying to build the snap packages. And, there are far too many requirements (multipass vm itself is a huge installation and alters your system).

    electron-builder

    Since I couldn't get the snap package to build I decided to add electron-builder back in and see if I could build it the old way.

    I simply updated my devDependencies (added electron-builder & electron-toolkit):

    "devDependencies": {
        "@electron-forge/cli": "^6.4.1",
        "@electron-forge/maker-deb": "^6.4.1",
        "@electron-forge/maker-rpm": "^6.4.1",
        "@electron-forge/maker-squirrel": "^6.4.1",
        "@electron-forge/maker-zip": "^6.4.1",
        "@electron-forge/maker-snap": "^6.4.1",
        "@electron-forge/plugin-auto-unpack-natives": "^6.4.1",
        "electron": "^26.2.1",
        "electron-builder": "^24.6.4",
        "electron-toolkit": "^1.0.2"
    
      },
    

    Then I added the required build section to package.json also,

    "build": {
        "appId": "com.cyapass.CYaPass",
        "copyright": "Copyright © 2022",
        "productName": "CYaPass",
        "electronVersion": "26.2.1",
        "asar": true,
        "directories": {
          "output": "dist",
          "buildResources": "build"
        },
        "linux": {
          "category": "Utility.Passwords",
          "icon": "CYaPass.png",
          "executableName": "cyapass"
        },
        "win": {
          "icon": "build/CYaPass512.png"
        }
      }
    

    I added a new script (to scripts section of package.json) to build the distro:

    "dist": "electron-builder"
    

    After that I needed the dependencies for electron-builder installed so I ran

    $ npm install 
    

    Then I built the distro (which includes building a snap package)

    $ npm run dist
    

    It took about 30 seconds and I had an AppImage and a new Snap package which I was able to successfully deploy to Snapcraft.io.

    Solved!

    At this point, you kind of need both packaging systems to make things easier.


  2. That’s funny, since I believe electron-builder uses electron-forge to build snaps

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search