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

Error downloading binary on alpine linux #153

Closed
tarrencev opened this issue Jun 9, 2020 · 6 comments · Fixed by #154
Closed

Error downloading binary on alpine linux #153

tarrencev opened this issue Jun 9, 2020 · 6 comments · Fixed by #154
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Milestone

Comments

@tarrencev
Copy link

tarrencev commented Jun 9, 2020

Running into an issue when fetching the query engine on alpine:3.11.6 docker:

api_1       | info: 2020/06/09 22:12:13 no query engine defined or found
api_1       | info: 2020/06/09 22:12:13 if you want to pre-fetch the query engine for better startup performance, specify `binaryTargets = ["native"]` in your Schema.prisma file under "generator" and upload the query engine with your application.
api_1       | info: 2020/06/09 22:12:13 fetching the query engine now...
api_1       | info: 2020/06/09 22:12:14 done.
api_1       | panic: ensure: version check failed: fork/exec /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/prisma-query-engine-debian-openssl-1.1.x: no such file or directory

If I attach into the container I see the file is there:

info: 2020/06/09 23:26:17 no query engine defined or found
info: 2020/06/09 23:26:17 if you want to pre-fetch the query engine for better startup performance, specify `binaryTargets = ["native"]` in your Schema.prisma file under "generator" and upload the query engine with your application.
info: 2020/06/09 23:26:17 fetching the query engine now...
info: 2020/06/09 23:26:18 done.
panic: ensure: version check failed: fork/exec /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/prisma-query-engine-debian-openssl-1.1.x: no such file or directory

goroutine 1 [running]:
github.com/insideiq/api/pkg/db.Init()
	/go/src/github.com/tarrencev/api/pkg/db/db.go:13 +0x1d6
main.init.0()
	/go/src/github.com/tarrencev/api/main.go:20 +0x3e
/ # ls /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/
prisma-query-engine-debian-openssl-1.1.x      prisma-query-engine-debian-openssl-1.1.x.tmp
@tarrencev
Copy link
Author

Seems platform is just not supported.

/ # readelf -l /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/prisma-query-engine-debian-openssl-1.1.x|grep "program interpreter"
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/ # apk add libc6-compat
(1/1) Installing libc6-compat (1.1.24-r2)
OK: 18 MiB in 20 packages
/ # /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/prisma-query-engine-debian-openssl-1.1.x
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/prisma-query-engine-debian-openssl-1.1.x)
Error relocating /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/prisma-query-engine-debian-openssl-1.1.x: __register_atfork: symbol not found
Error relocating /tmp/prisma/binaries/engines/4dbefe724ae6df3621eb660a5d0e0402e34189bf/prisma-query-engine-debian-openssl-1.1.x: __res_init: symbol not found

@steebchen steebchen reopened this Jun 10, 2020
@steebchen
Copy link
Owner

Thanks for the issue, we have binaries for alpine already, I just need to make the go client aware of them.

@steebchen
Copy link
Owner

@tarrencev Can you please update to the latest version using go get github.com/prisma/prisma-client-go@master and try again on an alpine platform, and let me know if there are any issues? Thanks!

@steebchen steebchen added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. labels Jun 12, 2020
@steebchen steebchen added this to the v0.0.3 (upcoming) milestone Jun 15, 2020
@jakubmeysner
Copy link

jakubmeysner commented Jan 11, 2021

@steebchen I've recently been trying to set up a Go project using Prisma to use Alpine Linux and while the Prisma CLI successfully downloads (to take advantage of caching I first run go run github.com/prisma/prisma-client-go version) when trying to generate the client I get the following error:

panic: could not run [version]: fork/exec /root/.cache/prisma/binaries/cli/2.11.0/prisma-cli-linux: no such file or directory

goroutine 1 [running]:
main.main()
        /go/pkg/mod/github.com/prisma/[email protected]/main.go:29 +0x493
exit status 2

After checking I found out that even though the output said the Prisma CLI was fetched successfully the directory /root/.cache/prisma did not appear. The version command also doesn't actually print the info.

@steebchen
Copy link
Owner

@jakubmeysner Can you share your docker file, or at least the image you're using? Feel free to create a new issue for this, since this is a different problem.

@jakubmeysner
Copy link

@steebchen done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants