Pkg: Cannot run on alpine linux

Created on 18 Jul 2018  路  1Comment  路  Source: vercel/pkg

I am building the binary locally on ubuntu and I am running it on an alpine linux docker image. Running the binary gives me /bin/sh: eval: line 28: ./ci-skip: not found then ldd ci-skip gives me

        /lib64/ld-linux-x86-64.so.2 (0x559ded2b2000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x559ded2b2000)
        librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x559ded2b2000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f452ba39000)
        libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x559ded2b2000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f452b821000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x559ded2b2000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x559ded2b2000)
Error relocating ./ci-skip: __register_atfork: symbol not found
Error relocating ./ci-skip: backtrace: symbol not found

Changing the image to debian based worked fine. Is there something I am missing? I just used pkg index.js to build the binary.

Most helpful comment

I didn't know alpine was a separate target platform so pkg -t alpine index.js did the trick. This should be in the documentation.

>All comments

I didn't know alpine was a separate target platform so pkg -t alpine index.js did the trick. This should be in the documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Admiral-Enigma picture Admiral-Enigma  路  3Comments

asaf050 picture asaf050  路  3Comments

Ks89 picture Ks89  路  4Comments

peterjwest picture peterjwest  路  3Comments

Nisthar picture Nisthar  路  4Comments