goaccess-deniedgopls

gopls: failed to install. Access is denied


enter image description here

I started learning Golang today. when I started to learn a vsc pop up said something about gopls and gopath. My go path is : C:\Users\Acer\Desktop\Coding\Belajar Coding\Golang Go root : C:\Program Files\Go my project : C:\Users\Acer\Desktop\Coding\Belajar Coding\Golang\src\Projek Latihan

this is the problem:
s environment: GOPATH=C:\Users\Acer\Desktop\Coding\Belajar Coding\Golang Installing 7 tools at C:\Users\Acer\Desktop\Coding\Belajar Coding\Golang\bin in module mode.
gotests
gomodifytags
impl
goplay
dlv
staticcheck
gopls

Installing github.com/cweill/gotests/gotests@v1.6.0 FAILED
{
 "code": 1,
 "killed": false,
 "signal": null,
 "cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/cweill/gotests/gotests@v1.6.0",
 "stdout": "",
 "stderr": "go: downloading github.com/cweill/gotests v1.6.0\ngo: github.com/cweill/gotests/gotests@v1.6.0: rename C:\\Users\\Acer\\Desktop\\Coding\\Belajar Coding\\Golang\\pkg\\mod\\cache\\download\\github.com\\cweill\\gotests\\@v\\v1.6.0.zip18685481.tmp C:\\Users\\Acer\\Desktop\\Coding\\Belajar Coding\\Golang\\pkg\\mod\\cache\\download\\github.com\\cweill\\gotests\\@v\\v1.6.0.zip: Access is denied.\n"
}
Installing github.com/fatih/gomodifytags@v1.16.0 FAILED
{
 "code": 1,
 "killed": false,
 "signal": null,
 "cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/fatih/gomodifytags@v1.16.0",
 "stdout": "",
 "stderr": "go: downloading github.com/fatih/gomodifytags v1.16.0\ngo: github.com/fatih/gomodifytags@v1.16.0: rename C:\\Users\\Acer\\Desktop\\Coding\\Belajar Coding\\Golang\\pkg\\mod\\cache\\download\\github.com\\fatih\\gomodifytags\\@v\\v1.16.0.zip685848023.tmp C:\\Users\\Acer\\Desktop\\Coding\\Belajar Coding\\Golang\\pkg\\mod\\cache\\download\\github.com\\fatih\\gomodifytags\\@v\\v1.16.0.zip: Access is denied.\n"
}

sorry for bad English

I tried

  1. reinstalling Go extension from VSC
  2. changing the gopath to my project directory (I don't know if I should do this or not)

Solution

  • I fix this problem, what i do is turn off the antivirus