You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dsMin/dsBaseRpc/Linux上安装Go环境+配置DLV.txt

30 lines
885 B

# 配置Golang环境
wget -c https://studygolang.com/dl/golang/go1.14.6.linux-amd64.tar.gz
tar -C /usr/local/ -zxvf go1.14.6.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile.d/go.sh
echo "export PATH=$PATH:/home/user/go/bin" >> /etc/profile.d/go.sh
echo "export PATH=$PATH:/root/go/bin" >> /etc/profile.d/go.sh
source /etc/profile.d/go.sh
mkdir -p ~/home/user/go
echo "export GOPATH=/home/user/go" >> /etc/profile.d/gopath.sh
source /etc/profile.d/gopath.sh
chmod +x /etc/profile.d/*.sh
echo $GOPATH
#设置代理
go env -w GOPROXY=https://goproxy.cn,direct
# 下载dlv
yum install git -y
go get github.com/go-delve/delve/cmd/dlv
# Goland配置方法
https://www.jianshu.com/p/e74e940a64d9
dlv --listen=:2345 --headless=true --api-version=2 exec ./dsBaseRpc
//构建一个强制转换的错误~~~~
//panic(400)