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

关于Windows对make不兼容,导致无法打包的解决方案 #21

Open
msh01 opened this issue Jul 7, 2023 · 2 comments
Open

关于Windows对make不兼容,导致无法打包的解决方案 #21

msh01 opened this issue Jul 7, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@msh01
Copy link

msh01 commented Jul 7, 2023

Windows对make的支持有问题, 网上提到通过chocolate来安装make的方式试了下,依然不OK。
最后摸索了种方案,可以在chatgpt-plus\api\go 目录下,powershell执行如下命令,可以实现打包编译的效果

# GOOS为目标环境的系统,GOARCH为目标环境的CPU架构
$env:CGO_ENABLED=0; $env:GOOS="linux" ; $env:GOARCH="amd64"; go build -o bin/chatgpt-v3-amd64-linux main.go 
@yangjian102621 yangjian102621 added the bug Something isn't working label Jul 7, 2023
@msh01
Copy link
Author

msh01 commented Jul 7, 2023

命令改进了下,打包的时候请用如下命令。(打包环境是win11, 目标环境是Ubuntu 22)
$env:CGO_ENABLED=0; $env:GOOS="linux" ; $env:GOARCH="amd64"; go build -o bin/chatgpt-v3-amd64-linux main.go

@msh01
Copy link
Author

msh01 commented Jul 7, 2023

直接在powershell里面运行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants