Go install runtime/cgo:open/usr/local/go/pkg/darwin_amd64/runtime/cgo.a:permission denied

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

When you do the update, you receive the following prompt:

Go get Github.com/astaxie/beego
Go install runtime/cgo:open/usr/local/go/pkg/darwin_amd64/runtime/cgo.a:permission denied

Look at the directory, there are no cgo.a files.

So it is not the problem of not having permission to find this file error. Setting permissions through sudo does not solve this problem.

Http://www.cnblogs.com/ghj1976/archive/2013/05/17/3084006.html
http://grokbase.com/p/gg/golang-china/135gh2bj5p/gocn-9214-%E5%8D%87%E7%BA%A7%E5%88%B0go1-1%E5%90%8E%EF%BC% 8c-go-get-u-%e6%97%a0%e6%b3%95%e6%9b%b4%e6%96%b0%ef%bc%8c%e7%ab%9f%e7%84%b6%e6%8f%90%e7%a4% Ba-cannot-download-gopath-not-set

Workaround:

Disable CGO

Export Cgo_enabled=0

Then execute the go get command.

Reason:

It ' s a problem with your Go installation. Similar issues is reported there and there. I may only add this on MAC version from Homebrew works just fine.

Reference: HTTPS://GITHUB.COM/ALEKSI/NUT/ISSUES/26

When cross-compiling, the cgo.a file is discarded.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.