工具安装-install - GoFrame (ZH)-Latest - GoFrame官网 - 类似PHP-Laravel, Java-SpringBoot的Go企业级开发框架


本站和网页 https://goframe.org/pages/viewpage.action?pageId=1115782 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

工具安装-install - GoFrame (ZH)-Latest - GoFrame官网 - 类似PHP-Laravel, Java-SpringBoot的Go企业级开发框架
Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
GoFrame官网 - 类似PHP-Laravel, Java-SpringBoot的Go企业级开发框架
Spaces
Hit enter to search
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
Sign up
GoFrame (ZH)-LatestBlogSpace shortcuts快速开始历史版本文档GoFrame FAQGoFrame MeetupGoFrame社区团队GoFrame社区投稿文档小助手(向导)Page tree
Browse pagesConfigureSpace tools
Attachments (0)
Page History
People who can view
Page Information
Resolved comments
View in Hierarchy
View Source
Export to PDF
Export to Word
Pages
框架介绍
开发工具
Skip to end of banner
Jira links
Go to start of banner
工具安装-install
Skip to end of metadata
Created by 郭强, last modified by 海亮 on Jun 23, 2022
Go to start of metadata
该命令仅针对于预编译二进制下载安装。如果通过go install命名安装的工具的话,不需要手动再使用install命令安装gf工具。使用方式项目地址:https://github.com/gogf/gf/tree/master/cmd/gf我们已经预编译了常见系统平台的二进制(根据自己的系统环境选择):https://github.com/gogf/gf/releases如果你的网络下载比较慢,可以使用加速下载:https://toolwa.com/github/下载预编译Linux or MacOS 在终端执行:wget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(go env GOOS)_$(go env GOARCH) && chmod +x gf && ./gf install -y && rm ./gfWindows:到https://github.com/gogf/gf/releases自行下载自行编译下载源码https://github.com/gogf/gf根据自己的需要修改数据库依赖,文件/cmd/gf/internal/cmd/cmd_gen_dao.go的import。sqlite 和oracle 的驱动需要安装cgo环境进入到gf cli的源码目录/cmd/gf 编译安装到系统:Linux or MacOS :下载时已包含安装步骤Windows: 直接双击打开按步骤操作使用:安装后可在命令行的任意目录中使用gf 命令,执行gf -v测试是否安装成功 部分系统需要管理员权限支持。如果是MacOS下使用zsh的小伙伴可能会遇到别名冲突问题,可以通过alias gf=gf来解决,运行一次之后gf工具会自动修改profile中的别名设置,用户重新登录(或者重开终端)就好了。使用示例安装
$ ./gf_darwin_amd64 install
I found some installable paths for you(from $PATH):
Id | Writable | Installed | Path
0 | true | true | /usr/local/bin
1 | true | false | /Users/john/Workspace/Go/GOPATH/bin
2 | true | false | /Users/john/.gvm/bin
4 | true | false | /Users/john/.ft
please choose one installation destination [default 0]:
gf binary is successfully installed to: /usr/local/bin
使用
C:\Users\Administrator>gf -v
GoFrame CLI Tool v2.0.6, https://goframe.org
GoFrame Version: cannot find go.mod
CLI Installed At: C:\Users\Administrator\go\bin\gf.exe
CLI Built Detail:
Go Version: go1.17.7
GF Version: v2.0.6
Git Commit: 2022-03-31 16:57:32 66803fd6641e31c60f0489180668243ea092b87b
Build Time: 2022-03-31 16:55:38
Content Menu
搜索复制搜索复制
No labels
24 Comments
济南软件开发
windows系统安装
Permalink
Mar 09, 2021
刘羽禅
请下载gf.exe进行安装具体请看https://github.com/gogf/gf-cli/blob/master/README_ZH.MD
Permalink
Apr 07, 2021
beautiful
https://github.com/gogf/gf-cli/releases
Permalink
Jul 23, 2021
白夜
下载下来的exe ,点击安装,闪了一下就过去了。gf -v 不能正确输出,下载的是 gf cli 2.0 版本
Permalink
Feb 16, 2022
白夜
喔噢,原来直接把exe 放到 bin就好了 
Permalink
Feb 16, 2022
ming
直接放在go bin 的目录嘛?这样好像不太行吧?
Permalink
Mar 28, 2022
白夜
这个gf.exe放到安装目录(GOROOT)的/bin或者GOPATH的/bin都可以,其目的就是直接在命令行能引用到gf.exe就行。我是放到了GOPATH的/bin。 我的gf全路径是:
GoFrame CLI Tool v2.0.0-rc, https://goframe.org
GoFrame Version: cannot find go.mod
CLI Installed At: E:\go-workspace\bin\gf.exe # 安装路径
CLI Built Detail:
Go Version: go1.17.6
GF Version: v2.0.0-beta
Git Commit: 2022-01-24 11:02:57 37d535f61e975dff1765f98e3b505aeccfec338e
Build Time: 2022-01-24 03:01:42
Permalink
Mar 28, 2022
ming
通过gf install  windows  还是没有更新到最新的版本目录跟上面一样的
Permalink
Mar 28, 2022
乔大治
我也是闪一下就过去,通过右击【以管理员身份运行】解决了
Permalink
May 13, 2022
honorforlee
linux下安装,SPATH过多的时候,只默认前两个路径,且不是usr/local/go/bin下面。
Permalink
Jun 11, 2021
阿峰
建议在本1.16的文档上写明, 推荐安装1.16版ctl 否则官方demo会跑不起来
Permalink
Sep 07, 2021
小伙伴
gf updatechecking... downloading... Error: downloading failed for darwin amd64, may be network issue:执行gf update 的时候提示这个错误
Permalink
Dec 15, 2021
Lorenzo
我也遇到这个错误了
Permalink
Dec 22, 2021
ygcool
+1  你有解决吗?
Permalink
Dec 24, 2021
tangxinggang
无法下载 gf.exe 
Permalink
Jan 26, 2022
sudden3
文章中的https://github.com/gogf/gf/v2/tree/master/cmd/gf这个项目地址失效了
Permalink
Feb 27, 2022
ming
在windows 安装gf cli v2.04的步骤1.https://github.com/gogf/gf-cli/releases 下载相应的安装包2.因为直接点击会出闪退的情况所以 直接使用cmd 命运运行就ok了
Permalink
Mar 28, 2022
白夜
下载失败的,可以使用我下载好的这个: https://gitee.com/xiaobin_zhao/my-gf/raw/master/myapp/resource/doc/gf_windows_amd64_v2.0.6.exe
Permalink
Apr 08, 2022
零基础菜鸟
win10 ltsc版本下,首先gf-cli安装双击的时候闪退,只能用 ./gf_windows_amd64.exe install 安装,gf-cli工具用powershell安装完成,gf -v 提示无法将“gf”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。用cmd安装完后如果不关闭cmd,直接在这窗口下执行没问题,如果关掉重新打开cmd 执行gf命令,就提示'gf' 不是内部或外部命令,也不是可运行的程序或批处理文件。上述问题在管理员模式下也是这种问题,网上说的修改PowerShell执行权限也不管用,折腾了一晚上一个工具没搞定。用beego的工具反而没出现过上述问题,所以有点搞不懂什么原因造成的,请各位大佬解惑。
Permalink
Apr 25, 2022
白夜
是不是没有把 gf.exe 放到 系统环境变量
Permalink
Apr 25, 2022
fm104510
1、查看gf.exe所在目录是否添加到系统环境变量‘Path’中
Permalink
Apr 25, 2022
guyu
MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports)版本:10.14.4 (18E226)安装错误:未能打开文稿“gf_darwin_arm64” , 文本编码“unicode(UTF-8)”不适用安装错误:未能打开文稿“gf_darwin_amd64” , 文本编码“unicode(UTF-8)”不适用都尝试了,都有问题
Permalink
Jun 09, 2022
煎人寿
可以使用  wget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(go env GOOS)_$(go env GOARCH) && chmod +x gf && ./gf install -y && rm ./gf指令来安装, 如果你用的是zsh. 可以先把终端换成bash, 在执行上面那段指令. 安装完成后可以切换回来
Permalink
Aug 10, 2022
scanking
gf 升级时gf update报错,直接安装覆盖闪退,无法卸载重装,只能卸载go后重装,再安装最新版本的gf。有没有其他更好的方法?
Permalink
Jun 20, 2022
Overview
Content Tools
Powered by a free Atlassian Confluence Open Source Project License granted to GoFrame. Evaluate Confluence today.
Powered by Atlassian Confluence 7.13.0
Printed by Atlassian Confluence 7.13.0
Report a bug
Atlassian News
Atlassian
{"serverDuration": 263, "requestCorrelationId": "ddf8aaf63c9aa972"}