Go Error--cannot Find Package

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

Please take care of every problem you encounter, please think carefully and find a solution.

When installing the development environment for each language, you will always encounter a variety of problems, scratching scratching the ears. This is not, when I use the Go Language development project, with the Go build main.go command to compile the project, encountered a annoying problem: Cannot find package "Github.com/astaxie/beego" in the any of:.

Description:
Download the Go Project code from the company SVN, the development environment has been configured as required. When using the Go build main.go command, there is a "Cannot find package" error: "Github.com/astaxie/beego" in any of:

Workaround:
Later carefully looked at the error info, found Gopath and I set the GOPATH=E:\WORK\ZHJD; The path of the E:\work\goproj is different. Strange, why is the printed gopath path different? Why is the path set by a colleague the same? Is this path written in an INI file? A series of questions from my mind constantly burst out, the path to solve the problem is spread out.
We use the Gosulime plugin to enable the sublime compiler to support the function of the code completion, so open the Gosublime.sublime-settings file for the go path configuration. Click Preferences (Reference) > Plug-in Settings (packages) Setting >gosublime>settings default input your own goroot, Gopath, etc., pictured below is my own environment configuration.

Results:
Build success!

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.