英文:
I can't start a golang server
问题
我下载了<https://github.com/Jhuster/RTCStartupDemo/tree/master/RTCSignalServer>。
现在我想在我的VPS上运行它,但我不知道该怎么做。
它是用Golang/go编写的。
所以我在我的Linux Ubuntu VPS上安装了go。
现在当我在目录中运行以下命令时:
source env.sh
make
它给我以下错误信息:
GOPATH = /RTCSignalServer
make[1]: 进入目录'/RTCSignalServer'
making for mac
pattern ./src/rtc.signal.com/app/...: directory prefix src/rtc.signal.com/app does not contain main module or its selected dependencies
make[1]: *** [Makefile:10: mac] Error 1
make[1]: 离开目录'/RTCSignalServer'
make: *** [Makefile:5: all] Error 2
现在我尝试在src/app/目录中创建一个main.go模块,但它仍然不起作用。
有人可以帮助我并给我应该运行的命令吗?
谢谢。
英文:
I downloaded <https://github.com/Jhuster/RTCStartupDemo/tree/master/RTCSignalServer>
Now I want to make this run on my VPS but I dont know how.
It is written in Golang/go.
So I installed go on my VPS in linux ubuntu.
Now when I run in the directory:
source env.sh
make
It gives me the following error message:
GOPATH = /RTCSignalServer
make[1]: Entering directory '/RTCSignalServer'
making for mac
pattern ./src/rtc.signal.com/app/...: directory prefix src/rtc.signal.com/app does not contain main module or its selected dependencies
make[1]: *** [Makefile:10: mac] Error 1
make[1]: Leaving directory '/RTCSignalServer'
make: *** [Makefile:5: all] Error 2
Now I tried to make a module of main.go in src/app/ directory but it still doesnt work.
Could someone please help me and give me the commands I should run?
Thank you.
答案1
得分: 1
谢谢,我按照以下方式构建它,并且它成功运行:
$ cd RTCSignalServer
$ go env -w GO111MODULE=off
$ source env.sh
$ make
英文:
Thank you I build it like this and it worked:
$ cd RTCSignalServer
$ go env -w GO111MODULE=off
$ source env.sh
$ make
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论