How to resolve running go run with below error

890 views
Skip to first unread message

Nikhilesh Susarla

unread,
Jun 27, 2023, 3:12:53 PM6/27/23
to golang-nuts
I was creating a cli application. I was building, testing it and all of sudden I made few code changes and then I wanted to do go run main.go, it gives me below error. 

fork/exec C:\Users\cydri\AppData\Local\Temp\go-build2802953115\b001\exe\main.exe: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
go: failed to remove work dir: CreateFile C:\Users\cydri\AppData\Local\Temp\go-build2802953115\b001\exe\main.exe: Operation did not complete successfully because the file contains a virus or potentially unwanted software.

I am not able to run the cli. I went and deleted that go-build temp folder too. But still the error persists. 

Any help appreciated. 

Thank you.

Kurtis Rader

unread,
Jun 27, 2023, 4:07:59 PM6/27/23
to Nikhilesh Susarla, golang-nuts
Disable your anti-virus software or configure it to ignore the relevant files. It is well known that many Windows anti-virus products have false positives regarding Go programs.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c5e36342-746f-4618-afe4-ce77fa79cc35n%40googlegroups.com.


--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
Reply all
Reply to author
Forward
0 new messages