Go-sqlite3: It don't run from a image named alpine when use docker.

Created on 23 Oct 2016  路  7Comments  路  Source: mattn/go-sqlite3

I go build my app with go-sqlite3 in linux.but it don't run in alpine container.

backup.go:14:20: fatal error: stdlib.h: No such file or directory compilation terminated.

I don't know why is it.If I use ubuntu environment compiler can run in ubuntu?

Most helpful comment

RUN apk add --update gcc g++

All 7 comments

Did you install gcc?

RUN apk add --update gcc g++

I'm passing the same problem
Did you solve it?

I'm solve it installing sqlite3 in my OS!

RUN apk add --update gcc musl-dev is enough

I go build my app with go-sqlite3 in alpine container.But it don't run in centos6.

/lib/ld-musl-x86_64.so.1: bad ELF interpreter: No such file or directory

@wmzy Yeah, that's because Alpine uses musl libc, whereas Centos uses glibc. If your program is linked against one sort of libc, it cannot run on a system that uses a different one. Not a problem with this package.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

student020341 picture student020341  路  9Comments

ghost picture ghost  路  6Comments

jacentsao picture jacentsao  路  6Comments

anacrolix picture anacrolix  路  6Comments

CaptainQuirk picture CaptainQuirk  路  13Comments