can't find import: fmt

757 views
Skip to first unread message

Yoyo

unread,
Feb 2, 2011, 2:02:45 PM2/2/11
to golang-nuts
I just tried to install Go and I get a ( go ) compiler error. ( Error
listed below )

OS: Fedora Linux 14 ( 32-bit )
Compiler: 8g

What I did:

$ hg clone -r release https://go.googlecode.com/hg/ go
$ cd go/src
$ ./all.bash
( no errors )
$ cd ../..
$ mv go /usr/

PATH=$PATH:/usr/go/bin
GOROOT=/usr/go
GOOS=linux
GOARCH=386
GOBIN=/usr/go/bin/

file contents: first.go
<code>
package main
import "fmt"

func main() {
fmt.Printf("HI!")
}
</code>

$ 8g first.go
first.go:2: can't find import: fmt

Could this be a bug?

Gustavo Niemeyer

unread,
Feb 2, 2011, 3:12:06 PM2/2/11
to Yoyo, golang-nuts
> $ 8g first.go
> first.go:2: can't find import: fmt
>
> Could this be a bug?

Please run this command as:

strace 8g first.go 2> strace.txt

and send me the strace.txt file.

--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter

Eoghan Sherry

unread,
Feb 2, 2011, 4:58:02 PM2/2/11
to Yoyo, golang-nuts

Check out the GOROOT_FINAL variable in
http://golang.org/doc/install.html#environment

Eoghan

Reply all
Reply to author
Forward
0 new messages