安装goInception

本文详细介绍了如何在Linux环境下从零开始安装配置必要的开发工具,包括Git和Go语言环境,并逐步引导读者完成goInception项目的下载、构建及运行。特别针对在构建过程中可能出现的错误提供了具体的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

基础环境准备

# 安装git
apt install git
# 如果报错则用下面的安装
apt-get update
apt-get upgrade
apt-get install git

# 安装go
apt install golang-go
# 下载源码
git clone https://github.com/hanchuanchuan/goInception

cd goInception

make parser

# 构建二进制包
go build -o goInception tidb-server/main.go

出现下载不了的情况的时候

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct // 使用七牛云的

构建二进制包的时候遇到如下错误

verifying github.com/coreos/etcd@v3.3.10+incompatible: checksum mismatch
	downloaded: h1:jFneRYjIvLMLhDLC
	go.sum:     h1:KjVWqrZ5U0wa3CxY2Ax

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

解决:

$ go clean -modcache
# 这里的project指的是goInception项目目录
$ cd project && rm go.sum
$ go mod tidy
# 重新build,构建二进制包
go build -o goInception tidb-server/main.go
cd /root/goInception/config
cp config.toml.default ../config.toml
cd ..
vim  config.toml

# 启动
./goInception -config=./config.toml
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值