Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The go command doesn't work. #5

Closed
Ri2parna opened this issue May 17, 2020 · 9 comments
Closed

The go command doesn't work. #5

Ri2parna opened this issue May 17, 2020 · 9 comments
Labels
question Further information is requested

Comments

@Ri2parna
Copy link

I tried running the command ans successfully installed the apktool but the install apkurlgrep doesn't seem to work. i cloned the github repo and then tried using go run apkurlgrep -a /path/to/apk but that didn't work as well. am i doing something wrong ?

@sharad1126
Copy link

sharad1126 commented May 17, 2020

I faced the same issue. I went in the go folder(in the workspace) which was in ~ for me and then manually ran the go file in /src/ndelphit/

go run apkurlgrep.go -a ~/path to apk file

@Ri2parna
Copy link
Author

Did manually running work for you? I tied running it manually as well but it didn't work for me. The apktool was working fine though.

@sharad1126
Copy link

sharad1126 commented May 17, 2020

yeah I had to manually compile the go file. The application doesn't works directly even though I added the path export GOPATH="$HOME/go" to the workspace where I have it installed(I am new to go so could be wrong or missing something somewhere). @ndelphit fyi

@Ri2parna
Copy link
Author

Okay. Thanks :-)

@ndelphit
Copy link
Owner

Hi all,

Given the last two problems related to GOPATH, I think it would be good to create a binary of this program in releases page. This may help people who don't have installed GO on their machine.

I will do this as soon as possible.

@ndelphit ndelphit added the question Further information is requested label May 17, 2020
@sharad1126
Copy link

sharad1126 commented May 17, 2020

@ndelphit I have GOLang installed in my system and still the application doesn't works for me directly. There is some other issue here! Therefore, I was able to compile your .go file and run it.
The problem is running the tool after installing it.

@sharad1126
Copy link

% go
Go is a tool for managing Go source code.

Usage:

	go <command> [arguments]

The commands are:

	bug         start a bug report
	build       compile packages and dependencies
	clean       remove object files and cached files
	doc         show documentation for package or symbol
	env         print Go environment information
	fix         update packages to use new APIs
	fmt         gofmt (reformat) package sources
	generate    generate Go files by processing source
	get         add dependencies to current module and install them
	install     compile and install packages and dependencies
	list        list packages or modules
	mod         module maintenance
	run         compile and run Go program
	test        test packages

@ndelphit
Copy link
Owner

ndelphit commented May 17, 2020

@sharad1126 , as I sad before in your previous ticket this is not an issue related to this project.

The issue which you described here is happen when you doesn't set go/bin directory into PATH. You can check this by going to the ~/go/bin folder. If you see the apkurlgrep file there, then everything is fine with the installation process.

For example my ~/.zshrc looks like:

  export GOPATH=$HOME/go
  export GOROOT=/usr/local/opt/go/libexec

  export PATH=$PATH:$(go env GOPATH)/bin

@sharad1126
Copy link

sharad1126 commented May 17, 2020

@ndelphit I mentioned in the above comments that I have this setup already:
export GOPATH=$HOME/go

I'll add the line: export PATH=$PATH:$(go env GOPATH)/bin too. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants