Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#29197 - [go] Unrecognized imports when using "go get"

Attached to Project: Community Packages
Opened by Jesus Alvarez (demizer) - Saturday, 31 March 2012, 03:14 GMT
Last edited by Alexander F. Rødseth (xyproto) - Saturday, 31 March 2012, 19:06 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Vesa Kaihlavirta (vegai)
Alexander F. Rødseth (xyproto)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Using "go get" produces errors:

sudo go get code.google.com/p/go-tour/gotour

package bytes: unrecognized import path "bytes"
package encoding/base64: unrecognized import path "encoding/base64"
package fmt: unrecognized import path "fmt"
package image: unrecognized import path "image"
package image/png: unrecognized import path "image/png"
package runtime: unrecognized import path "runtime"
package math/rand: unrecognized import path "math/rand"
package encoding/json: unrecognized import path "encoding/json"
package flag: unrecognized import path "flag"
package go/build: unrecognized import path "go/build"
package io/ioutil: unrecognized import path "io/ioutil"
package log: unrecognized import path "log"
package net/http: unrecognized import path "net/http"
package os: unrecognized import path "os"
package os/exec: unrecognized import path "os/exec"
package path/filepath: unrecognized import path "path/filepath"
package regexp: unrecognized import path "regexp"
package strconv: unrecognized import path "strconv"
package strings: unrecognized import path "strings"
package sync: unrecognized import path "sync"

I want to play with gotour, but it can't retrieve the package. The same thing happens to packages on github. Also, my $GOROOT is set to /usr/lib/go
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Saturday, 31 March 2012, 19:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  Please reopen if "sudo go get" still have problems. The package will be updated in [community] shortly.
Comment by Jelle van der Waa (jelly) - Saturday, 31 March 2012, 13:00 GMT
Did you follow the .install file?

Source /etc/profile.d/go.sh or relogin
Comment by Jesus Alvarez (demizer) - Saturday, 31 March 2012, 17:44 GMT
Yep, my $GOROOT points to /usr/lib/go. I originally had it defined in my bashrc from a year or two ago, but I removed it, re-installed go and rebooted. Now it points to the correct path. But still, whenever I try to use "go get" the error occurs.
Comment by Alexander F. Rødseth (xyproto) - Saturday, 31 March 2012, 17:50 GMT
sudo -s
source /etc/profile.d/go.sh
go get code.google.com/p/go-tour/gotour

solves it.

However, I think it's a good idea that "sudo go" works right after installation, so I'll make a wrapper script and update the go package.

Loading...