Pkg: Architecture problem (Segmentation fault error or cannot execute binary file : Exec format error)

Created on 10 Nov 2017  路  2Comments  路  Source: vercel/pkg

I cannot run my programs on different platforms. For example I cannot run a program on an x86_64 Linux if the program has been created on an i686 Linux platform. Besides if I run "pkg" command without any commands, it creates 3 files for each 3 platform (macos, win, linux) but again I cannot run them on different platforms. I get a "Segmentation Fault" error or a "cannot execute binary file : Exec format." error.
I converted my NodeJS app into an exe with PKG on MacOS (x64). I get a "Segmentation fault" on a x86_64 Linux (CentOS) and "cannot execute binary file : Exec format error" on a i686 Ubuntu.

Most helpful comment

Segmentation fault had happened to me after I used FTP to deploy binaries on server due to ASCII transfer mode. I'd recommend not to use FTP for apps deploying to prevent any possibility of that kind of error.

All 2 comments

It is not possible to compile a binary that runs cross platform.

Segmentation fault had happened to me after I used FTP to deploy binaries on server due to ASCII transfer mode. I'd recommend not to use FTP for apps deploying to prevent any possibility of that kind of error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peterjwest picture peterjwest  路  3Comments

Admiral-Enigma picture Admiral-Enigma  路  3Comments

Nisthar picture Nisthar  路  4Comments

ByeongYeon picture ByeongYeon  路  4Comments

j-brown picture j-brown  路  4Comments