Closed bpziegler closed 9 years ago
I tried installing the golang compiler using: sudo apt-get install golang
go version now returns: go version go1.2.1 linux/amd64
But now go get golang.org/x/sys/unix returns multiple errors:
../../go/src/golang.org/x/sys/unix/syscall_solaris.go:38: clen redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:784 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:51: ParseDirent redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:797 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:77: Pipe redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux_amd64.go:108 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:89: (_SockaddrInet4).sockaddr redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:291 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:103: (_SockaddrInet6).sockaddr redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:305 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:118: (*SockaddrUnix).sockaddr redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:320 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:144: Getsockname redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:492 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:153: ImplementsGetwd redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:164 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:157: Getwd redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:168 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:178: Getgroups redeclared in this block previous declaration at ../../go/src/golang.org/x/sys/unix/syscall_linux.go:181 ../../go/src/golang.org/x/sys/unix/syscall_solaris.go:178: too many errors
Sorry, please ignore. Properly installing go (using the docs from golang to get a binary dist of 1.5) fixed my problem.
I get the following error when running "go get github.com/tobert/pcstat/pcstat"
/home/ubuntu/go/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:29: error: undefined reference to 'golang.org_x_sys_unix.use' /home/ubuntu/go/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:30: error: undefined reference to 'golang.org_x_sys_unix.use' /home/ubuntu/go/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:46: error: undefined reference to 'golang.org_x_sys_unix.use' /home/ubuntu/go/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:69: error: undefined reference to 'golang.org_x_sys_unix.use' collect2: error: ld returned 1 exit status
My go version is: go version xgcc (Ubuntu 4.9.1-0ubuntu1) 4.9.1 linux/amd64
My OS is:
uname -a Linux ip-10-0-2-186 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 14.04.3 LTS
Note that command "go get golang.org/x/sys/unix" runs successfully.
Any help greatly appreciated.