Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go get unrecognized import path "golang.org/x/text/language" #10

Open
sushengbuhuo opened this issue Dec 3, 2018 · 2 comments
Open

Comments

@sushengbuhuo
Copy link

[root@VM_0_14_centos ~]# go get github.com/MagicalTux/goro/sapi/php-cli
package golang.org/x/text/language: unrecognized import path "golang.org/x/text/language" (https fetch: Get https://golang.org/x/text/language?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
package golang.org/x/crypto/hkdf: unrecognized import path "golang.org/x/crypto/hkdf" (https fetch: Get https://golang.org/x/crypto/hkdf?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
package golang.org/x/crypto/md4: unrecognized import path "golang.org/x/crypto/md4" (https fetch: Get https://golang.org/x/crypto/md4?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
package golang.org/x/crypto/pbkdf2: unrecognized import path "golang.org/x/crypto/pbkdf2" (https fetch: Get https://golang.org/x/crypto/pbkdf2?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
package golang.org/x/crypto/ripemd160: unrecognized import path "golang.org/x/crypto/ripemd160" (https fetch: Get https://golang.org/x/crypto/ripemd160?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
package golang.org/x/crypto/sha3: unrecognized import path "golang.org/x/crypto/sha3" (https fetch: Get https://golang.org/x/crypto/sha3?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
 
[root@VM_0_14_centos ~]# go version
go version go1.9.4 linux/amd64
@98P
Copy link

98P commented Dec 4, 2018

network access failed
You can use the following library, update to local and change the name

go get -u github.com/golang/text
mv $GOPATH/src/github.com/golang/text $GOPATH/src/golang.org/x/text

go get -u github.com/golang/crypto
mv $GOPATH/src/github.com/golang/crypto $GOPATH/src/golang.org/x/crypto

@MagicalTux
Copy link
Owner

It looks like golang.org is blocked in China, but can be accessed through https://golang.google.cn.

https://blog.golang.org/hello-china (which you probably can't read) but there are Chinese forums about Go on https://gocn.vip/ where people might have alternatives for this specific issue. @98P 's solution should work just fine too.

A quick search references some documents too, such as https:/northbright/Notes/blob/master/Golang/china/get-golang-packages-on-golang-org-in-china.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants