help with the installation of this repository

What am I doing wrong? Why the "vt" command doesn't work for me. I did the following actions:
-
git clone https://github.com/VirusTotal/vt-cli
-
cd vt-cli
-
make install
-
sudo apt-get install bash-completion
-
When, after all the points I had done, I wrote "vt", then I was written that

-
I thought that it was necessary and took installed vt, which was recommended by kali linux itself, but as it turns out later - this is absolutely not what I need
-
I even tried "export PATH=$PATH:'go env GOPATH'/bin" to fix it somehow, but it didn't help, I don't know what to do, please help even just $GOPATH doesn't work for me, even though I installed:
-
sudo apt-get golang installation
-
sudo apt-get gccgo installation-go
I even tried to enter the following commands that you suggested: "vt completion bash > /etc/bash_completion.d/vt "
But it gives me the following error: zsh: permission denied: /etc/bash_completion.d/vt
Hello @eldar4ikyt,
Can you share your go env? Adding your $GOBIN to your path should fix the issue:
root@a7197fdf3d55:/vt-cli# go env GOPATH
/root/go
root@a7197fdf3d55:/vt-cli# go env GOBIN
root@a7197fdf3d55:/vt-cli# export GOBIN=`go env GOPATH`/bin
root@a7197fdf3d55:/vt-cli# go env GOBIN
/root/go/bin
root@a7197fdf3d55:/vt-cli# ls $GOBIN
vt
root@a7197fdf3d55:/vt-cli# export PATH=$PATH:$GOBIN
root@a7197fdf3d55:/vt-cli# vt
A command-line tool for interacting with VirusTotal.
Usage:
vt [command]
Available Commands:
analysis Get a file or URL analysis
collection Get information about collections
completion Output shell completion code for the specified shell (bash or zsh)
domain Get information about Internet domains
download Download files
file Get information about files
group Get information about VirusTotal groups
help Help about any command
hunting Manage malware hunting rules and notifications
init Initialize or re-initialize vt command-line tool
ip Get information about IP addresses
meta Returns metadata about VirusTotal
monitor Manage your monitor account
monitorpartner Manage your monitor partner account
retrohunt Manage retrohunt jobs
scan Scan files or URLs
search Search for files in VirusTotal Intelligence
url Get information about URLs
user Get information about VirusTotal users
version Show version number
Flags:
-k, --apikey string API key
-h, --help help for vt
--proxy string HTTP proxy
-v, --verbose verbose output
Use "vt [command] --help" for more information about a command.
Please let me know if this worked for you.
Regards, Marta
Hello @eldar4ikyt,
Any updates on this? Can we close this issue?
Regards, Marta
Hi @mgmacias95 I ran into the same issue and followed the steps above. It worked perfectly.
Regards Timi
Hi @mgmacias95 again, I am not able to run vt completion bash > /etc/bash_completion.d/vt, it gives permission denied error. Any help will be appreciated. Regards Timi
Hello @timiuaaa,
Does your user have writing permissions on the /etc/bash_completion directory? You can check using ls -l.
If your user does not have writing permissions, use chmod +w to grant these permissions on the directory.
Other option (not recommended though) would be running the vt completion bash > /etc/bash_completion.d/vt as sudo.
Let me know if this advice helped :).
Regards, Marta
Thanks @mgmacias95
This didn't work. Probably because go env GOBIN is not permanent. Whenever the terminal is closed, one need to run the commands given above https://github.com/VirusTotal/vt-cli/issues/41#issuecomment-1031230911
Any help will be appreciated.
Regards Timi
You can set the variable when running the command, like this:
$ GOBIN=`go env GOPATH`/bin vt completion bash > /etc/bash_completion.d/vt
Still getting the same error :(
bash: /etc/bash_completion.d/vt: Permission denied
Try running the command as root:
$ GOBIN=`go env GOPATH`/bin sudo vt completion bash > /etc/bash_completion.d/vt