英文:
GCP Cloud SQL Proxy - Cannot execute binary file: Exec format error
问题
我在执行 SQL 代理客户端时遇到了一个错误,用于连接从主机到 GCP SQL 的步骤可以在 https://cloud.google.com/sql/docs/postgres/sql-proxy 中找到。
以下是代码部分:
ubuntu@ubuntu22-10:~$ ./cloud_sql_proxy -dir=/cloudsql -instances=project_id+instance=tcp:0.0.0.0:5432 -credential_file=ser_account.json
-bash: ./cloud_sql_proxy: cannot execute binary file: Exec format error
操作系统信息(使用 Mac M1 2021 的 multipass 实例):
Linux ubuntu22-10 5.19.0-29-generic #30-Ubuntu SMP PREEMPT_DYNAMIC aarch64 aarch64 aarch64 GNU/Linux
看起来似乎与文件存在问题。你有什么想法吗?
英文:
I have am error ; when I execute the sql proxy client .
(for connecting from host to GCP SQL https://cloud.google.com/sql/docs/postgres/sql-proxy)
this is the code
ubuntu@ubuntu22-10:~$ ./cloud_sql_proxy -dir=/cloudsql -instances=project_id+instance=tcp:0.0.0.0:5432 -credential_file=ser_account.json
-bash: ./cloud_sql_proxy: cannot execute binary file: Exec format error
OS info ( multipass instance with mac m1 2021):
Linux ubuntu22-10 5.19.0-29-generic #30-Ubuntu SMP PREEMPT_DYNAMIC aarch64 aarch64 aarch64 GNU/Linux
it seems that there are problems with file.
Do you have any idea?
thanks
答案1
得分: 3
我有2个版本。一个旨在在Docker映像中运行,另一个在我的M1 Mac上本地运行。我混淆了amd64和arm64的二进制文件。确保您正在运行适用于您系统的正确二进制文件。
英文:
I had 2 versions. One was intended to run in a Docker image, and the other, locally on my M1 Mac. I mixed up the amd64 and the arm64 binaries. Make sure you're running the correct binary for your system.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论