Coder Social home page Coder Social logo

Comments (4)

ranzbak avatar ranzbak commented on May 21, 2024 18

For me it worked to execute :
export GOBIN=$GOPATH/bin
This got rid of the error:
go get: no install location for directory /X/ outside GOPATH For more details see: 'go help gopath'
I hope this helps.

from gobuster.

codingo avatar codingo commented on May 21, 2024 10

In main.go you'll notice the following:

import (
	"flag"
	"fmt"

	"github.com/OJ/gobuster/libgobuster"
)

Specifically, this line:

github.com/OJ/gobuster/libgobuster

What this is doing when you do a go build is checking for the library:

$GOPATH/github.com/OJ/gobuster/libgobuster

Typically, your gopath will default to /go/ under your home directory. So, if you're on kali linux and you've done a barebone go install, that path will be /root/go/.

There's a few solutions to this:

  • Change your gopath
  • Have the repositories in both gopath and opt
  • Move your program to your gopath

Option 1 is fairly easy for you to google, as it option 3. Since option 2 accomplishes what you are asking here, let's focus on that:

Gathering Dependencies

To add the gobuster dependencies to your gopath, you do the following:

go get github.com/OJ/gobuster

Build the application

You can then do a go build in your opt folder, and it will work.

Updating

If you take this approach you can't simply git pull and rebuild when updates come out. If you take this route each time you'll need to also update the second location, in your gopath, using the following:

go get -u github.com/OJ/gobuster

from gobuster.

OJ avatar OJ commented on May 21, 2024 1

Thanks @codingo for handling this one.

from gobuster.

AnotherWayIn avatar AnotherWayIn commented on May 21, 2024

try without sudo and cd into /gobuster then go build

from gobuster.

Related Issues (20)

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.