unrecognized import paths error while using go get

129 views
Skip to first unread message

Amandeep Gautam

unread,
Aug 14, 2018, 8:52:09 PM8/14/18
to golang-nuts
Hi,
   I installed gccgo on Solaris 11.3 using: sudo /opt/csw/bin/pkgutil -y -i gcc5core

Below is the output of go-5.5 env:

amandeep@s113ldom1:~$ go-5.5 env
GOARCH="sparc"
GOBIN=""
GOCHAR=""
GOEXE=""
GOHOSTARCH="sparc"
GOHOSTOS="solaris"
GOOS="solaris"
GOPATH="/home/amandeep/"
GORACE=""
GOROOT="/opt/csw"
GOTOOLDIR="/opt/csw/libexec/gcc/sparc-sun-solaris2.10/5.5.0"
CC="/opt/csw/bin/gcc-5.5"
GOGCCFLAGS="-fPIC -fmessage-length=0"
CXX="/opt/csw/bin/g++-5.5"
CGO_ENABLED="0"

I get unrecognized path error while trying to get a package:

amandeep@s113ldom1:~$ go-5.5 get github.com/dgrijalva/jwt-go
package bytes: unrecognized import path "bytes"
package crypto: unrecognized import path "crypto"
package crypto/ecdsa: unrecognized import path "crypto/ecdsa"
package crypto/hmac: unrecognized import path "crypto/hmac"
package crypto/rand: unrecognized import path "crypto/rand"
package crypto/rsa: unrecognized import path "crypto/rsa"
package crypto/subtle: unrecognized import path "crypto/subtle"
package crypto/x509: unrecognized import path "crypto/x509"
package encoding/base64: unrecognized import path "encoding/base64"
package encoding/json: unrecognized import path "encoding/json"
package encoding/pem: unrecognized import path "encoding/pem"
package errors: unrecognized import path "errors"
package fmt: unrecognized import path "fmt"
package math/big: unrecognized import path "math/big"
package runtime: unrecognized import path "runtime"
package strings: unrecognized import path "strings"
package sync: unrecognized import path "sync"
package time: unrecognized import path "time"

Most of the other resources online suggest that it might be because of inappropriately set GOROOT, but I haven't modified it.

After a little bit of digging I found that the .gox files are located in : /opt/csw/lib/go/5.5.0/sparc-sun-solaris2.10/
For example, bytes.gox lives at /opt/csw/lib/go/5.5.0/sparc-sun-solaris2.10/bytes.gox

Not sure what should be the correct settings here. Any suggestion appreciated.

Ian Lance Taylor

unread,
Aug 15, 2018, 12:33:02 AM8/15/18
to Amandeep Gautam, golang-nuts
Unfortunately I suspect that go get just doesn't work with that old
version. The current version is GCC 8; go get should work with that
version.

Ian
Reply all
Reply to author
Forward
0 new messages