ItsPi3141 / alpaca-electron

The simplest way to run Alpaca (and other LLaMA-based local LLMs) on your own computer
MIT License
1.29k stars 144 forks source link

Failing to run on Linux (Debian) #19

Closed jgbarah closed 1 year ago

jgbarah commented 1 year ago

Describe the bug

I'm trying to run in Debian, using the Linux installer from the 1.0.5 release, but it fails

To Reproduce

Download the Linux tar.gz, untar it. cd Alpaca Electron-linux-x64 ./Alpaca\ Electron

Write a question. It waits forever...

Even before writing a question, I get in the terminal:

innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-loader.js
- /home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
- /home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/index.js
- /home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/index.js
- 
    at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-loader.js:10:15)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-loader.js',
    '/home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js',
    '/home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/index.js',
    '/home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/index.js',
    undefined
  ]
}
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/build/Release/pty.node: invalid ELF header
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1846)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1138:18)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5:1846)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/jgb/src/alpaca/alpaca-electron/Alpaca Electron-linux-x64/resources/app/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-loader.js:6:11)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

Expected behavior

To get an electron window, to work with the chat.

Desktop (please complete the following information):

ItsPi3141 commented 1 year ago

Oh I built the Linux version on windows, might've messed something up with node-pty. I'll build it again today with WSL or a VM and let you know.

Senior-S commented 1 year ago

Any news on this issue? I have the same problem on Debian 11

ItsPi3141 commented 1 year ago

Fixed it. Try download the file from releases again.

jgbarah commented 1 year ago

Thanks a lot! I works now for me.