CentOS 8.5でElectronをインストールする
環境
OSバージョンの確認
# cat /etc/redhat-release
CentOS Linux release 8.5.2111
npmバージョンの確認
# npm -v
7.21.0
インストールの方法
1.electronをインストールします
# npm install -g electron
2.electronを起動します
# electron [1220/180519.887511:FATAL:electron_main_delegate.cc(290)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. /usr/local/lib/node_modules/electron/dist/electron exited with signal SIGTRAP
解決方法
root以外のユーザでelectronを起動します
# su - cftuser Last login: Mon Dec 20 17:02:20 PST 2021 from 192.168.229.1 on pts/0 [cftuser@localhost ~]$ electron Electron 16.0.5 - Build cross platform desktop apps with JavaScript, HTML, and CSS Usage: electron [options] [path] A path to an Electron app may be specified. It must be one of the following: - index.js file. - Folder containing a package.json file. - Folder containing an index.js file. - .html/.htm file. - http://, https://, or file:// URL. Options: -i, --interactive Open a REPL to the main process. -r, --require Module to preload (option can be repeated). -v, --version Print the version. -a, --abi Print the Node ABI version. /usr/local/lib/node_modules/electron/dist/electron exited with signal SIGTRAP