Error with golang.org/x/net/websocket when "go get collidermain" — AppRTC deployment on Ubuntu 14.04 server

huangapple go评论95阅读模式
英文:

Error with golang.org/x/net/websocket when "go get collidermain" --- AppRTC deployment on Ubuntu 14.04 server

问题

我一直在尝试将AppRTC部署到我学校的Ubuntu服务器上,但一直没有成功。我按照Collider部分的说明进行操作,直到执行命令"go get collidermain"时出现以下错误:

# golang.org/x/net/websocket
goWorkspace/src/golang.org/x/net/websocket/dial.go:18:19: error: reference to undefined identifier ‘tls.DialWithDialer’
   conn, err = tls.DialWithDialer(dialer, "tcp", parseAuthority(config.Location), config.TlsConfig)

我不知道是什么原因导致了这个错误,尽管我已经重新安装了多个版本的Go(1.7.4、1.6.4、1.6.3、1.6.),但在"go get collidermain"处仍然出现相同的错误。

你们有没有人在部署AppRTC时遇到过这个问题?我希望知道答案的善心人士能帮助我解决这个问题。非常感谢。

英文:

I have been trying to deploy the AppRTC onto my school’s Ubuntu server but to no avail. I have followed the instructions on the Collider part until the command “go get collidermain” which return me with error as follow:

# golang.org/x/net/websocket
goWorkspace/src/golang.org/x/net/websocket/dial.go:18:19: error: reference to undefined identifier ‘tls.DialWithDialer’
   conn, err = tls.DialWithDialer(dialer, "tcp", parseAuthority(config.Location), config.TlsConfig)

I have no idea what causes the error and even though I have reinstalled multiple versions of Go (1.7.4, 1.6.4, 1.6.3, 1.6.) but I still get the same error at “go get collidermain”.

Anyone of you face this problem in deploying AppRTC? I'm hoping any kind souls who know the answer to this can help me with my problem. Thank you very much.

答案1

得分: 3

我已经通过重新安装Go语言来解决了这个问题,按照以下步骤进行操作:

感谢@ssk在这个问题的回答:https://stackoverflow.com/questions/33641595/how-to-deploy-apprtcs-collider-into-google-app-engine/33728216#33728216

Collider需要在Google Compute Engine或等效的Amazon服务中部署。以下是我经历的步骤列表:

1)从以下网址安装Go:https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz

2)设置PATH变量:export PATH=$PATH:/usr/local/go/bin

3)设置GOROOT:export GOROOT=/usr/local/go

4)设置GOPATH(必须与GOROOT不同):export GOPATH=/usr/local/go-dependencies(如果不存在,必须创建go-dependencies目录)

5)检出apprtc代码:git clone https://github.com/webrtc/apprtc.git

6)将collider文件复制到$GOROOT/src:

sudo cp -rf apprtc/src/collider/collider /usr/local/go/src/
sudo cp -rf apprtc/src/collider/collidermain /usr/local/go/src/
sudo cp -rf apprtc/src/collider/collidertest /usr/local/go/src/

7)安装websocket:go get -v golang.org/x/net/websocket

8)安装依赖项:go get collidermain

9)安装collidermain:go install collidermain

10)运行collidermain:/usr/local/go/bin/collidermain -port=8089 -tls=false(需要证书以启用tls)

英文:

I have resolved this problem with reinstall go-lang use follow steps:

> Thanks for @ssk's answer in question: https://stackoverflow.com/questions/33641595/how-to-deploy-apprtcs-collider-into-google-app-engine/33728216#33728216

Collider needs to be deployed in Google Compute Engine or equivalent services by Amazon. Here is the list of steps that I had go through:

    1. Install go from: https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
    1. Set PATH variable: export PATH=$PATH:/usr/local/go/bin
    1. Set GOROOT export GOROOT=/usr/local/go
    1. Set GOPATH (must be different from GOROOT) export GOPATH=/usr/local/go-dependencies (have to create go-dependencies directory if not there)
    1. Checkout apprtc code: git clone https://github.com/webrtc/apprtc.git
    1. Copy collider files to $GOROOT/src:

    <pre><code>sudo cp -rf apprtc/src/collider/collider /usr/local/go/src/
    sudo cp -rf apprtc/src/collider/collidermain /usr/local/go/src/
    sudo cp -rf apprtc/src/collider/collidertest /usr/local/go/src/
    </pre></code>

    1. Install websocket: go get -v golang.org/x/net/websocket
    1. Install Dependencies: go get collidermain
    1. Install collidermain: go install collidermain
  • 10 Run collidermain: /usr/local/go/bin/collidermain -port=8089 -tls=false (need a certificate to run with tls enabled)

huangapple
  • 本文由 发表于 2017年1月19日 21:09:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/41742609.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定