Coder Social home page Coder Social logo

Comments (9)

orvice avatar orvice commented on August 24, 2024

golang版本号多少?
go env的输出发下

from shadowsocks-go.

glzjin avatar glzjin commented on August 24, 2024

go get 卡住时执行以下以下两条命令,GOWORK 请自行替换为自己的目录,

git clone https://github.com/go-redis/redis.git /root/gowork/src/gopkg.in/redis.v3

git clone https://github.com/bsm/ratelimit.git /root/gowork/src/gopkg.in/bsm/ratelimit.v1

同时附上已经编译好了的可执行文件,x86 和 x86_64 都有。

https://www.zhaojin97.cn/wp-content/uploads/2016/02/0bebd747705875222b22dd28e08734462016022902163730090.zip

from shadowsocks-go.

fsgmhoward avatar fsgmhoward commented on August 24, 2024

@glzjin 这个不行,我昨天提交issue之前就已经尝试过了。反而出现编译错误了。

# gopkg.in/redis.v3
src/gopkg.in/redis.v3/pool.go:144:10: error: reference to undefined identifier ‘atomic.Value’
  lastErr atomic.Value
          ^
src/gopkg.in/redis.v3/pool.go:159:2: error: return with value in function with no return type
  return p
  ^
src/gopkg.in/redis.v3/pool.go:175:3: error: expected channel
   case cn := <-p.freeConns:
   ^
src/gopkg.in/redis.v3/pool.go:197:3: error: expected channel
   case cn := <-p.freeConns:
   ^
src/gopkg.in/redis.v3/pool.go:175:17: error: expected channel
   case cn := <-p.freeConns:
                 ^
src/gopkg.in/redis.v3/pool.go:197:17: error: expected channel
   case cn := <-p.freeConns:
                 ^

不过不管怎样谢谢你的回答。

@orvice 我的env:

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/shadowsocks-go/mu"
GORACE=""
GOROOT="/usr"
GOTOOLDIR="/usr/lib/gccgo/tool"
TERM="dumb"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CXX="g++"
CGO_ENABLED="1"

from shadowsocks-go.

glzjin avatar glzjin commented on August 24, 2024

不会吧。。。我编译成功了。。。。好吧。。。。。

from shadowsocks-go.

glzjin avatar glzjin commented on August 24, 2024

https://www.zhaojin97.cn/read-3189.html

这是我的升级和编译过程的随手记

from shadowsocks-go.

orvice avatar orvice commented on August 24, 2024

@fsgmhoward

cd /root
mkdir
export GOPATH=/root/go
go get github.com/orvice/shadowsocks-go
cd /root/go/src/github.com/orvice/shadowsocks-go/mu
go get
go build
./mu -debug

from shadowsocks-go.

fsgmhoward avatar fsgmhoward commented on August 24, 2024

@orvice 出错,问题几乎一样

root@develop:~# go get github.com/orvice/shadowsocks-go
package github.com/orvice/shadowsocks-go
        imports github.com/orvice/shadowsocks-go
        imports github.com/orvice/shadowsocks-go: no buildable Go source files i                                                      n /root/go/src/github.com/orvice/shadowsocks-go
root@develop:~# cd /root/go/src/github.com/orvice/shadowsocks-go/mu
root@develop:~/go/src/github.com/orvice/shadowsocks-go/mu# go get
# gopkg.in/redis.v3
../../../../gopkg.in/redis.v3/pool.go:144:10: error: reference to undefined identifier ‘atomic.Value’
  lastErr atomic.Value
          ^
../../../../gopkg.in/redis.v3/pool.go:159:2: error: return with value in function with no return type
  return p
  ^
../../../../gopkg.in/redis.v3/pool.go:175:3: error: expected channel
   case cn := <-p.freeConns:
   ^
../../../../gopkg.in/redis.v3/pool.go:197:3: error: expected channel
   case cn := <-p.freeConns:
   ^
../../../../gopkg.in/redis.v3/pool.go:175:17: error: expected channel
   case cn := <-p.freeConns:
                 ^
../../../../gopkg.in/redis.v3/pool.go:197:17: error: expected channel
   case cn := <-p.freeConns:
                 ^
root@develop:~/go/src/github.com/orvice/shadowsocks-go/mu# go build
# gopkg.in/redis.v3
../../../../gopkg.in/redis.v3/pool.go:144:10: error: reference to undefined identifier ‘atomic.Value’
  lastErr atomic.Value
          ^
../../../../gopkg.in/redis.v3/pool.go:159:2: error: return with value in function with no return type
  return p
  ^
../../../../gopkg.in/redis.v3/pool.go:175:3: error: expected channel
   case cn := <-p.freeConns:
   ^
../../../../gopkg.in/redis.v3/pool.go:197:3: error: expected channel
   case cn := <-p.freeConns:
   ^
../../../../gopkg.in/redis.v3/pool.go:175:17: error: expected channel
   case cn := <-p.freeConns:
                 ^
../../../../gopkg.in/redis.v3/pool.go:197:17: error: expected channel
   case cn := <-p.freeConns:
                 ^

btw,我把expert改为了export,应该是你的拼写错误吧。
还有我的go是直接apt-get install gccgo-go来安装的,会不会是这个的问题,这是另外一台机子了,在完全不同的网络环境下。系统都是Ubuntu 14.04 LTS。

from shadowsocks-go.

orvice avatar orvice commented on August 24, 2024

用go1.5.3?

from shadowsocks-go.

fsgmhoward avatar fsgmhoward commented on August 24, 2024

确认是go版本的问题,用go 1.6的执行文件包就没问题了
感谢帮助。

from shadowsocks-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.