Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 22.04でnpm run setupに失敗する #192

Open
meganetaaan opened this issue Aug 10, 2023 · 1 comment
Open

Ubuntu 22.04でnpm run setupに失敗する #192

meganetaaan opened this issue Aug 10, 2023 · 1 comment

Comments

@meganetaaan
Copy link
Collaborator

meganetaaan commented Aug 10, 2023

不具合の概要

npm run setupに失敗する

再現手順
不具合を再現できる手順を記述してください

  1. npm run setupを実行する
  2. 以下のエラーが発生する
washishi@ubuntu:~/stack-chan/firmware$ npm run setup

> stack-chan@0.2.1 setup
> xs-dev setup

Setting up Linux tools!
? Installing dependencies.../home/washishi/stack-chan/firmware/node_modules/gluegun/build/index.js:15
    throw up;
    ^

Error: Command failed with exit code 1: sudo --askpass --preserve-env apt-get install --yes gcc git wget make libncurses-dev flex bison gperf
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

sudo: no password was provided
    at makeError (/home/washishi/stack-chan/firmware/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/home/washishi/stack-chan/firmware/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  shortMessage: 'Command failed with exit code 1: sudo --askpass --preserve-env apt-get install --yes gcc git wget make libncurses-dev flex bison gperf',
  command: 'sudo --askpass --preserve-env apt-get install --yes gcc git wget make libncurses-dev flex bison gperf',
  escapedCommand: 'sudo --askpass --preserve-env apt-get install --yes gcc git wget make libncurses-dev flex bison gperf',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: 'qt.qpa.xcb: could not connect to display \n' +
    'qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.\n' +
    'This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.\n' +
    '\n' +
    'Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.\n' +
    '\n' +
    'sudo: no password was provided',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

想定する挙動
環境構築が正しく行われる

環境 (次の項目を埋めてください):

  • OS: Ubuntu 22.04
  • スタックチャンのバージョン dev/v1.0最新

その他

Discordで @mongonta0716 さん、 @washishi さんから報告いただきました。

@meganetaaan
Copy link
Collaborator Author

通常xs-devssh-askpassを使ってUI上でのパスワード入力を求めますが、Ubuntu 22.04ではこのパッケージが初期状態でインストールされていないためにエラーが発生します。

  • (解決策)ssh-askpassをインストールしてGUI環境上で行う
  • (回避策)下記のように適当なコマンドをsudoで実行してパスワードを入力する。CLIでしばらくそのパスワードが記憶されるため入力を求められずに済む。
$ sudo ls
$ npm run setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant