Code Monkey home page Code Monkey logo

Comments (40)

aboutqx avatar aboutqx commented on May 29, 2024 12

After set GOROOT,you also need export PATH=$PATH:$GOROOT/bin,then it will execute from PATH.
It works for me,on ubuntu 18.

from chaos.

rams3sh avatar rams3sh commented on May 29, 2024 9

Had same problem and this solution worked for me. This solution is specific to Kali Linux and works only if you have installed golang using apt package manager as the uninstall commands used below are dependent on apt based installation of golang.

  1. First uninstall the current installation of golang.

apt-get purge golang

  1. Clean up your apt caches and remove all unwanted left out dependencies of the golang which has not been uninstalled. I stacked up all housecleaning apt commands in there to ensure , there is no leftovers.

apt-get autoclean
apt-get autoremove
apt-get clean
apt-get remove

  1. Install golang
    apt-get install golang

Try out typing "go version" to check if it is installed correctly
Hope this solution works.

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024 2

It will not work if golang is not configured correctly.

Try reinstall golang.

Run as root:
apt update && apt install golang

Case get some error, please send me the output.

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024 1

Run
ls /usr/lib/go-1.8
And send me output.

In this folder is installed go.

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024 1

There are folders
bin, doc, pkg, src, test VERSION AND A favicon.ico.gz

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024 1

Ok.
Run
export GOROOT="/usr/lib/go-1.8"

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

What is your operating system?

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

Kali Linux 2016.2

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

Run on terminal:
go env

And send me output.

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

I have installed golang and after that I am running this command go env
rook@kali:~# go env bash: go: command not found root@kali:~#
https://imgur.com/a/ykkYQ

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

Do you have your OS upgraded?
That's some bug on kali probably, if not solve the problem upgrading your system, try reinstall.

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

Maybe

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

Nobody else had it

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

You can try set GOROOT.
Moment..

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

Guide me please

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

I am able to run go in bin by ./go

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

Did

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

Run go on terminal. Works?

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

Nope

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

Lol wtf

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

See this image
https://imgur.com/a/lGrTg

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

export GOROOT="/usr/lib/go-1.8"

remove /bin

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

Yes after seeing that I have mistakenly added bin, I removed bin and then tried still not working

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

I am able to run chaos by changing directory to /use/lib/go-1.8/bin
And then running ./go run /root/Desktop/CHAOS.go

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

But go is not able to make exe it gives error

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

Probably it give errors cause need environment variables configured like that:

Variables

You can set using export before:
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/go-1.8"
GOTOOLDIR="/usr/lib/go-1.8/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build786735881=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

Or reinstall OS.

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

I have all same settings

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

I have a folder go and go-1.7 should I delete them

from chaos.

X0R1972 avatar X0R1972 commented on May 29, 2024

i have the same problem..i dont understand because i had CHAOS it work perferct then i deleted because i had not enough space in my disk ...then aftercouple day's i download it again and now when i want to run it ,i have this strange message .." bash: go: command not found "

from chaos.

X3eRo0 avatar X3eRo0 commented on May 29, 2024

I finally had to change my os. I found no solution

from chaos.

tiagorlampert avatar tiagorlampert commented on May 29, 2024

@mateo24xx
When this occurs normally is because the Golang is not installed or the GOROOT is not set correctly. I don't know why this is happening, but the recommended would be reinstall Golang, if it does not resolve is probably some problem in the OS.

from chaos.

godmarvin avatar godmarvin commented on May 29, 2024

maybe not permission to execute the .sh file;
commend:ll and find the file or directory permissions

from chaos.

toannd96 avatar toannd96 commented on May 29, 2024

After set GOROOT,you also need export PATH=$PATH:$GOROOT/bin,then it will execute from PATH.
It works for me,on ubuntu 20.

from chaos.

seqrity avatar seqrity commented on May 29, 2024

You can do the following steps for install:

sudo apt-get install golang
git clone https://github.com/tomnomnom/httprobe.git
cd httprobe
go build main.go
mv main httprobe
Help:
./httprobe -h

Ref: https://www.youtube.com/watch?v=OoK-CGFjYXY

from chaos.

tiago-peres avatar tiago-peres commented on May 29, 2024

I've gone through the same problem and in my case the problem was with the go .tar.gz I've used.

So, to install Go, started by running

curl -O https://dl.google.com/go/go$VERSION.linux-amd64.tar.gz

OR

curl -O https://dl.google.com/go/go$VERSION.linux-386.tar.gz

I tested first with ...-386.tar.gz but then kept getting

/usr/local/go/bin/go: No such file or directory.

then eventually it worked fine with

curl -O https://dl.google.com/go/go1.16.6.linux-amd64.tar.gz

from chaos.

ELBEQQAL94 avatar ELBEQQAL94 commented on May 29, 2024

apt install golang -y

work perfect

Thanks for help

from chaos.

nidsydv1202 avatar nidsydv1202 commented on May 29, 2024

hiiii,

from chaos.

nidsydv1202 avatar nidsydv1202 commented on May 29, 2024

In my case, there is go is installed and go path is set. But When I am installing the chaincode it gives the error.

from chaos.

dyappscrip avatar dyappscrip commented on May 29, 2024

try exporting env in local terminal
export PATH=$(go env GOPATH)/bin:$PATH

from chaos.

Asef264 avatar Asef264 commented on May 29, 2024

try this :
export PATH=$PATH:/usr/local/go/bin

from chaos.

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.