package bufio: unrecognized import path "bufio" 编译ngrok服务端

编译自己的ngrok服务端安装手记


按照网上教程

编译ngrok服务端时 make release-server

go-bindata报错:



GOOS="" GOARCH="" go get github.com/jteeuwen/go-bindata/go-bindata
package bufio: unrecognized import path "bufio"
package bytes: unrecognized import path "bytes"
package compress/gzip: unrecognized import path "compress/gzip"
package flag: unrecognized import path "flag"
package fmt: unrecognized import path "fmt"
package io: unrecognized import path "io"
package io/ioutil: unrecognized import path "io/ioutil"
package os: unrecognized import path "os"
package path/filepath: unrecognized import path "path/filepath"
package regexp: unrecognized import path "regexp"
package runtime: unrecognized import path "runtime"
package sort: unrecognized import path "sort"
package strings: unrecognized import path "strings"
package unicode: unrecognized import path "unicode"
package unicode/utf8: unrecognized import path "unicode/utf8"
make: *** [bin/go-bindata] 错误 1


查看自己go env 和网上一致

root@gmt-21:/usr/lib/go# go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gmt/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
TERM="dumb"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CXX="g++"
CGO_ENABLED="1"



经过大牛指点将GOROOT设置成/usr/bin/go 之后解决问题。

你可能感兴趣的:(ngrok)