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

cannot execute binary file: Exec format error #74

Open
TigersWay opened this issue May 23, 2023 · 8 comments
Open

cannot execute binary file: Exec format error #74

TigersWay opened this issue May 23, 2023 · 8 comments

Comments

@TigersWay
Copy link

Hoping for the best, I just tried rustywind and I got this error!

Windows 11 / Node 18.6

@praveenperera
Copy link
Member

@TigersWay try another binary from the releases?

@RafaelKr
Copy link

I installed rustywind via npm and just got zsh: exec format error: node_modules/rustywind/bin/rustywind.

Executing file node_modules/rustywind/bin/rustywind shows it's a ARM64 binary, but I'm on a x86-64 system.
node_modules/rustywind/bin/rustywind: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE|HAS_TLV_DESCRIPTORS>

@praveenperera
Copy link
Member

Thanks for the info @RafaelKr are you on linux?

@RafaelKr
Copy link

Yes, Linux Mint 22 with Cinnamon desktop environment. They also provide live installers if you want to try it in a VM or on a live system booted from USB (https://linuxmint-installation-guide.readthedocs.io/en/latest/burn.html, https://linuxmint.com/download.php)

@praveenperera
Copy link
Member

@RafaelKr I pushed a change to master, could you pull this repo down

cd npm
npm i .

And paste in the logs here, thanks

@RafaelKr
Copy link

It seems to select the correct platform now (x64-linux)

> [email protected] install
> node ./lib/postinstall.js || npm run prepack

Downloading: rustywind
 from: https://github.com/avencera/rustywind
 for platform: x64-linux

Deleting invalid download cache
Downloading rustywind failed: Error: Cannot find module '../release.json'
Require stack:
- /home/user/path/to/rustywind/npm/lib/download.js
- /home/user/path/to/rustywind/npm/lib/postinstall.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1219:15)
    at Module._load (node:internal/modules/cjs/loader:1045:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
    at Module.require (node:internal/modules/cjs/loader:1304:12)
    at require (node:internal/modules/helpers:123:16)
    at getAssetFromGitHub (/home/user/path/to/rustywind/npm/lib/download.js:171:23)
    at async module.exports (/home/user/path/to/rustywind/npm/lib/download.js:290:5)
    at async main (/home/user/path/to/rustywind/npm/lib/postinstall.js:77:5)

> [email protected] prepack
> node ./lib/update-release.js

node:internal/modules/cjs/loader:1222
  throw err;
  ^

Error: Cannot find module './download-release'
Require stack:
- /home/user/path/to/rustywind/npm/lib/update-release.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1219:15)
    at Module._load (node:internal/modules/cjs/loader:1045:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
    at Module.require (node:internal/modules/cjs/loader:1304:12)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (/home/user/path/to/rustywind/npm/lib/update-release.js:7:25)
    at Module._compile (node:internal/modules/cjs/loader:1467:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
    at Module.load (node:internal/modules/cjs/loader:1282:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/user/path/to/rustywind/npm/lib/update-release.js'
  ]
}

Node.js v22.4.1
npm error code 1
npm error path /home/user/path/to/rustywind/npm
npm error command failed
npm error command sh -c node ./lib/postinstall.js || npm run prepack
npm error A complete log of this run can be found in: /home/user/.npm/_logs/2024-11-26T16_20_13_440Z-debug-0.log

@praveenperera
Copy link
Member

praveenperera commented Nov 26, 2024

@RafaelKr pull and try again, i deleted the download-release file because i thought we weren't using it anymore

@RafaelKr
Copy link

RafaelKr commented Nov 26, 2024

It seems to work now.

> [email protected] install
> node ./lib/postinstall.js || npm run prepack

Downloading: rustywind
 from: https://github.com/avencera/rustywind
 for platform: x64-linux

Downloading from https://api.github.com/repos/avencera/rustywind/releases/assets/201067035
Downloading to /tmp/rustywind-cache-0.23.1/rustywind-v0.23.1-x86_64-unknown-linux-musl.tar.gz
Unzipping to /home/user/path/to/rustywind/npm/bin
rustywind
tar xvf exited with 0

up to date, audited 6 packages in 1s

found 0 vulnerabilities

file bin/rustywind shows

bin/rustywind: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, stripped

Edit: Running npm/bin/rustywind --help also works.

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

3 participants