忘记密码   免费注册 查看新帖 |

ChinaUnix.net

  平台 论坛 博客 文库 频道自动化运维 虚拟化 储存备份 C/C++ PHP MySQL 嵌入式 Linux系统
最近访问板块 发新帖
查看: 3089 | 回复: 2

[其他] go1.10.linux-amd64.tar.gz安装问题求教 [复制链接]

论坛徽章:
0
发表于 2018-03-28 10:33 |显示全部楼层
小弟新手,最近想学习go,安装环境遇到点问题,求助goer:

机器:Linux Testserver 2.6.18-92.el5xen #1 SMP Tue Apr 29 13:31:30 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

安装包:go1.10.linux-amd64.tar.gz

过程:1、安装包解压后放到 /usr/local/go

total 192
-rw-r--r--  1 root root 47028 Feb 17 01:12 AUTHORS
-rw-r--r--  1 root root  1339 Feb 17 01:12 CONTRIBUTING.md
-rw-r--r--  1 root root 61940 Feb 17 01:12 CONTRIBUTORS
-rw-r--r--  1 root root  1479 Feb 17 01:12 LICENSE
-rw-r--r--  1 root root  1303 Feb 17 01:12 PATENTS
-rw-r--r--  1 root root  1555 Feb 17 01:12 README.md
-rw-r--r--  1 root root     6 Feb 17 01:12 VERSION
drwxr-xr-x  2 root root  4096 Feb 17 01:12 api
drwxr-xr-x  2 root root  4096 Feb 17 01:18 bin
drwxr-xr-x  4 root root  4096 Feb 17 01:18 blog
drwxr-xr-x  8 root root  4096 Feb 17 01:12 doc
-rw-r--r--  1 root root  5686 Feb 17 01:12 favicon.ico
drwxr-xr-x  3 root root  4096 Feb 17 01:12 lib
drwxr-xr-x 14 root root  4096 Feb 17 01:18 misc
drwxr-xr-x  9 root root  4096 Feb 17 01:18 pkg
-rw-r--r--  1 root root    26 Feb 17 01:12 robots.txt
drwxr-xr-x 46 root root  4096 Feb 17 01:12 src
drwxr-xr-x 20 root root 12288 Feb 17 01:18 test


       2、配置环境变量
       3、测试
[order@Testserver go]$ go version
go version go1.10 linux/amd64
[order@Testserver go]$
       4、运行测试脚本
[order@Testserver hello]$ go run helloworld.go
runtime: epollwait on fd 291 failed with 9
fatal error: runtime: netpoll failed
runtime stack:
runtime.throw(0x8b326f, 0x17)
        /usr/local/go/src/runtime/panic.go:619 +0x81
runtime.netpoll(0x151ff5b5af7a0c00, 0x0)
        /usr/local/go/src/runtime/netpoll_epoll.go:75 +0x216
runtime.sysmon()
        /usr/local/go/src/runtime/proc.go:4260 +0x424
runtime.mstart1(0x0)
        /usr/local/go/src/runtime/proc.go:1222 +0xe7
runtime.mstart()
        /usr/local/go/src/runtime/proc.go:1188 +0x76
goroutine 1 [runnable]:
syscall.Syscall(0x4, 0xc4202ba000, 0xc4202b8038, 0x0, 0xffffffffffffffff, 0x0, 0x2)
        /usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.Stat(0xc4202b6000, 0x20, 0xc4202b8038, 0xc4202b6000, 0x20)
        /usr/local/go/src/syscall/zsyscall_linux_amd64.go:1485 +0x97
os.statNolog(0xc4202b6000, 0x20, 0xc4202b4000, 0x2, 0x2, 0xc4202b6000)
        /usr/local/go/src/os/stat_unix.go:31 +0x5c
os.Stat(0xc4202b6000, 0x20, 0x2, 0x2, 0xc4202b6000, 0x20)
        /usr/local/go/src/os/stat.go:13 +0x4d
go/build.(*Context).isDir(0xb07960, 0xc4202b6000, 0x20, 0x2)
        /usr/local/go/src/go/build/build.go:127 +0x4a
go/build.(*Context).Import.func3(0x90d140, 0xd, 0x1, 0x1)
        /usr/local/go/src/go/build/build.go:605 +0x33a
go/build.(*Context).Import(0xb07960, 0xc420282041, 0x7, 0xc4201ef9a0, 0x16, 0x4, 0xc420244800, 0x0, 0x0)
        /usr/local/go/src/go/build/build.go:623 +0x6aef
cmd/go/internal/load.LoadImport(0xc420282041, 0x7, 0xc4201ef9a0, 0x16, 0xc420244400, 0xc4202a1b58, 0xc42027c270, 0x1, 0x1, 0x1, ...)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:457 +0xadf
cmd/go/internal/load.(*Package).load(0xc420244400, 0xc4202a1b58, 0xc4201f4a80, 0x0, 0x0)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:1084 +0xb42
cmd/go/internal/load.LoadImport(0xc4201c1791, 0x4, 0xc4201ef0e0, 0x14, 0xc420244000, 0xc4202a1b58, 0xc42023edb0, 0x1, 0x1, 0x1, ...)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:467 +0xb8f
cmd/go/internal/load.(*Package).load(0xc420244000, 0xc4202a1b58, 0xc4201f4700, 0x0, 0x0)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:1084 +0xb42
cmd/go/internal/load.LoadImport(0xc4201c0f89, 0x2, 0xc4201ee420, 0x15, 0xc42007f800, 0xc4202a1b58, 0xc4201e2c30, 0x2, 0x2, 0x1, ...)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:467 +0xb8f
cmd/go/internal/load.(*Package).load(0xc42007f800, 0xc4202a1b58, 0xc4201f4000, 0x0, 0x0)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:1084 +0xb42
cmd/go/internal/load.LoadImport(0xc4201c0adb, 0x3, 0xc4201ee000, 0x15, 0xc42007f400, 0xc4202a1b58, 0xc4201ece10, 0x1, 0x1, 0x1, ...)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:467 +0xb8f
cmd/go/internal/load.(*Package).load(0xc42007f400, 0xc4202a1b58, 0xc4201b3c00, 0x0, 0x0)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:1084 +0xb42
cmd/go/internal/load.GoFilesPackage(0xc42009a080, 0x1, 0x1, 0x441000)
        /usr/local/go/src/cmd/go/internal/load/pkg.go:1565 +0x7cc
cmd/go/internal/run.runRun(0xafe560, 0xc42009a080, 0x1, 0x1)
        /usr/local/go/src/cmd/go/internal/run/run.go:74 +0x32c
main.main()
        /usr/local/go/src/cmd/go/main.go:140 +0x7e1
goroutine 19 [syscall]:
os/signal.signal_recv(0x0)
        /usr/local/go/src/runtime/sigqueue.go:139 +0xa6
os/signal.loop()
        /usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
        /usr/local/go/src/os/signal/signal_unix.go:28 +0x41




论坛徽章:
0
发表于 2018-03-28 10:35 |显示全部楼层
和网上安装教程也对比了下,确认环境变量配置没有问题,不知道问题在哪 ?

论坛徽章:
0
发表于 2018-03-29 10:19 |显示全部楼层
  求回复,成功解决红包感谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号 北京市公安局海淀分局网监中心备案编号:11010802020122
广播电视节目制作经营许可证(京) 字第1234号 中国互联网协会会员  联系我们:wangnan@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP