Fails on arm64 linux Ubuntu, e-b tries to use x86 executable
electron-builder -l deb
• electron-builder version=22.11.7 os=5.4.0-80-generic
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
• rebuilding native dependencies [email protected], [email protected] platform=linux arch=arm64
• install prebuilt binary name=usb version=1.7.1 platform=linux arch=arm64 napi=
• install prebuilt binary name=sharp version=0.27.2 platform=linux arch=arm64 napi=
• packaging platform=linux arch=arm64 electron=13.1.7 appOutDir=dist/linux-arm64-unpacked
• building target=deb arch=arm64 file=dist/nostlan_1.21.13_arm64.deb
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86/fpm-1.9.3-2.3.1-linux-x86.7z size=4.6 MB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86/fpm-1.9.3-2.3.1-linux-x86.7z duration=4.322s
⨯ cannot execute cause=exit status 1
errorOut=/home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: cannot execute binary file: Exec format error
/home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: Success
command=/home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/fpm -s dir --force -t deb -d libgtk-3-0 -d libnotify4 -d libnss3 -d libxss1 -d libxtst6 -d xdg-utils -d libatspi2.0-0 -d libuuid1 -d libappindicator3-1 -d libsecret-1-0 --deb-compression xz --architecture arm64 --after-install /tmp/t-EECOha/0-after-install --after-remove /tmp/t-EECOha/1-after-remove --description '
Nostlan is a nostlagia launcher for retro and current gen video game emulators!' --version 1.21.13 --package /home/qashto/nostlan/dist/nostlan_1.21.13_arm64.deb --name nostlan --maintainer 'quinton-ashley <[email protected]>' --url 'https://github.com/quinton-ashley/nostlan#readme' --vendor 'quinton-ashley <[email protected]>' --deb-priority optional --license MIT /home/qashto/nostlan/dist/linux-arm64-unpacked/=/opt/nostlan /home/qashto/nostlan/build/icon.png=/usr/share/icons/hicolor/0x0/apps/nostlan.png /tmp/t-EECOha/2-nostlan.desktop=/usr/share/applications/nostlan.desktop
workingDir=
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
still relevant
Same here. arm64, debian bullseye
$ electron-builder --arm64
• electron-builder version=22.14.5 os=5.10.69-rockchip64
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
• packaging platform=linux arch=arm64 electron=13.5.2 appOutDir=dist/linux-arm64-unpacked
• building target=deb arch=arm64 file=dist/element-desktop_1.9.8_arm64.deb
⨯ cannot execute cause=exit status 1
errorOut=/home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: cannot execute binary file: Exec format error
/home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: Success
command=/home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/fpm [...]
Until this is fixed, one can supply their own version of fpm as a workaround:
$ gem install fpm
$ USE_SYSTEM_FPM=true electron-builder --arm64 [...]
Ran into the same issue, trying to build an arm64 .deb on a Raspberry Pi. The above solution from @3nprob works, but only when Ruby is installed from the Ubuntu repo, not as a snap. So my steps were:
-
sudo apt-get install ruby-dev build-essential -
sudo gem install fpm -
export USE_SYSTEM_FPM=true(must be done before each build) -
npm run<build script: electron-builder --linux deb --config [...]>
If someone wants to make fpm in electron-builder work for arm64/aarch64 I wrote a guide how to do so here: https://github.com/signalapp/Signal-Desktop/issues/6063#issuecomment-1307001166
Feel free to pick up that work, I don't have time to do so.
Getting same issue, while building on raspberry pi 4
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
Asdf
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
covfefe