Coder Social home page Coder Social logo

Comments (5)

s0nerik avatar s0nerik commented on May 17, 2024

Please try this:

  1. Open terminal
  2. cd to project's folder
  3. Run brew install dep
  4. Run dep ensure
  5. Try building the project again

from goloc.

MSavisko avatar MSavisko commented on May 17, 2024

@s0nerik

  • After dep ensure receive the message:
root project import: /Users/MSavisko/Documents/Projects/PET/goloc is not within any GOPATH/src
  • Then sh build.sh and the same error:
3 errors occurred:
--> darwin/amd64 error: exit status 1
Stderr: main.go:6:2: cannot find package "github.com/s0nerik/goloc/goloc" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/s0nerik/goloc/goloc (from $GOROOT)
        /Users/MSavisko/go/src/github.com/s0nerik/goloc/goloc (from $GOPATH)
main.go:7:2: cannot find package "github.com/s0nerik/goloc/platforms/resolver" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/s0nerik/goloc/platforms/resolver (from $GOROOT)
        /Users/MSavisko/go/src/github.com/s0nerik/goloc/platforms/resolver (from $GOPATH)
main.go:8:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT)
        /Users/MSavisko/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH)
--> linux/amd64 error: exit status 1
Stderr: main.go:6:2: cannot find package "github.com/s0nerik/goloc/goloc" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/s0nerik/goloc/goloc (from $GOROOT)
        /Users/MSavisko/go/src/github.com/s0nerik/goloc/goloc (from $GOPATH)
main.go:7:2: cannot find package "github.com/s0nerik/goloc/platforms/resolver" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/s0nerik/goloc/platforms/resolver (from $GOROOT)
        /Users/MSavisko/go/src/github.com/s0nerik/goloc/platforms/resolver (from $GOPATH)
main.go:8:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT)
        /Users/MSavisko/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH)
--> windows/amd64 error: exit status 1
Stderr: main.go:6:2: cannot find package "github.com/s0nerik/goloc/goloc" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/s0nerik/goloc/goloc (from $GOROOT)
        /Users/MSavisko/go/src/github.com/s0nerik/goloc/goloc (from $GOPATH)
main.go:7:2: cannot find package "github.com/s0nerik/goloc/platforms/resolver" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/s0nerik/goloc/platforms/resolver (from $GOROOT)
        /Users/MSavisko/go/src/github.com/s0nerik/goloc/platforms/resolver (from $GOPATH)
main.go:8:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT)
        /Users/MSavisko/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH)

from goloc.

s0nerik avatar s0nerik commented on May 17, 2024

Probably the main problem is that you've cloned a project into an arbitrary folder, and not to GOPATH. To make sure that the project is cloned into the right directory, instead of cloning by hand you should run go get github.com/s0nerik/goloc. This will automatically put the project's folder into the folder inside GOPATH. On macOS (if you didn't change GOPATH by hand) the path to the project will be /Users/<username>/go/src/github.com/s0nerik/goloc. Please, let me know if the problem won't go away after using go get instead of cloning the repo by hand.

from goloc.

MSavisko avatar MSavisko commented on May 17, 2024

@s0nerik
go get works fine
PRs for documentation: #6, #7

from goloc.

s0nerik avatar s0nerik commented on May 17, 2024

Glad go get worked. Thank you for the contributions!

from goloc.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.