I want to debug GoLang on VSCode editor. In their documentation they say it is possible. I am following the following Link to install the debugging features on the IDE.
https://marketplace.visualstudio.com/items?itemName=lukehoban.Go
And to install Delve they ask to follow these instructions
https://github.com/derekparker/delve/blob/master/Documentation/installation/windows/install.md
Once installation is completed they ask to run the following code
$ mingw32-make install
But there is an error
mingw32-make: *** No rule to make target 'install'. Stop.
Does anybody know whats wrong with this? Has anything changed other than these instructions?
I managed to get this resolved. You don't want to install mingw for this. Instead run this code and make sure the dlv.exe which is created in any directory which is in your PATH variable in your computer.
$go get -u github.com/derekparker/delve/cmd/dlv
I also did an writeup about debugging Golang using VSCode and Delve. If you are interested you can read it here.
Run mingw32-make install command from directory created by git clone https://github.com/derekparker/delve command.
Related
When I ran the command "go install github.com/go-delve/delve/cmd/dlv" in the delve folder, after downloading go-delve in my go path, the terminal showed the following result:
"go install github.com/go-delve/delve/cmd/dlv: mkdir /Desktop: read-only file system"
Terminal result put here
When I googled the same, I came across a website(https://www.dev2qa.com/how-to-fix-read-only-file-system-error-when-run-mkdir-command-on-macos/) which requires me to disable System Integrity Protection on my MacBook and it asks me to hold the option key or command + R immediately after Mac chimes in reboot after starting the MacBook, until I see a boot in a "console/terminal" mode.. But nothing happened when I tried doing that.
I am not knowing what to do. Please guide me through the right way to install dlv and other packages of go successfully on my Macbook.
make sure you use the right go version (1.16 or later, arm64)
$ go version
go version go1.17.1 darwin/arm64
make sure the env is right by this command
$ go env
check GOROOT GOPATH GOARCH GOBIN
try to install it directly
$ go install github.com/go-delve/delve/cmd/dlv#latest
your error occurs because you have no permission of /Desktop, and i'm sure install dlv don't need something like this, it will install to ~/go/bin
After installing Plug 'fatih/vim-go' Plugin for golang i get few errors
steps:
When opening .go file with vim I get a error:
vim-go: could not find 'gopls' . Run :GoInstallBinaries to fix it
vim-go: could not determine appropriate working directory for go plus
When doing :GoInstallBinaries I get more errors like:
vim-go: guru not found. instaling golang.org..guru#master to folder C:\Users\*MYPC*\go\bin\
vim-go: Error instaling golang.org/x/tools/cmdfuru#master: The system cannot find the path specified.
vim-go: goplus not found. instaling golang.org..goplus#latest to folder C:\Users\*MYPC*\go\bin\
vim-go: Error instaling golang.org..goplus#latest: The system cannot find the path specified.
.
.
.
it does that 8 more times with godef,motion,errcheck,dlv,iferr,golint...
When i do :echo $PATH in Vim i have C:\Users*MYPC*\go\bin\
I am running gvim on Windows 10
golang in cmd or powershell work fine...
Just run go get golang.org/x/tools/gopls#latest, and problem solved!
Answer for WSL (Windows subsystem for Linux):
I tried to installed gopls manually, running go get golang.org/x/tools/gopls#latest but I was getting the following error:
XXXX#XXXX:~$ go get golang.org/x/tools/gopls#latest
go: can only use path#version syntax with 'go get' and 'go install' in module-aware mode
Changing the Go mode fixed the problem at this stage GO111MODULE=on, then I could run
go install golang.org/x/tools/gopls#latest
However, later on, when vim-go was trying to install the missing packages after running GoInstallBinaries I was getting errors that I couldn't use versions with go install. So what I did was reinstall Go (the latest version) on the system using these instructions. After doing that, vim-go was able to install the packages. I hope this answer saves time for future vim-go enthusiasts.
for mac was solved with
brew install gopls
In the vim-go setup instructions, there's a detail about running :GoInstallBinaries in vim after install. You probably missed it (I ran into this issue after I upgraded to a new go runtime)
I found couple of answers but none of them was helpful, I downloaded omnetpp for MAC (omnetpp-5.6.1-src-macosx.tar) if i open the IDE directly I get "“Omnetpp” is damaged and can’t be opened." I tried installing it like 5 times. I found that I should execute setenv, I got this error "Error: not a login shell -- run this script as 'source setenv' or '. setenv'"
Can someone please help me with the steps to install/use omnetpp? Thank you so much in advance.
As the error message suggests:
first open a terminal window
change to the omnetpp installation directory i.e. cd ~/omnetpp-5.6.1 or similar.
source setenv
./configure
make -j4
omnetpp
You have to put the "omnetpp-5.6.1" directory right in the home path: i.e. ~/Users/yourname
Open the "doc" directory in "omnetpp-5.6.1" directory and there you can see an installation guide which helps you what to do step by step.
Do the instruction. be careful writing the command ./configure it may not work. If it doesn't you should use ./configure WITH_TKENV=no WITH_QTENV=no instead of that.
Also before you run $ make command in terminal you have to run $ . setenv .
I did the instruction but I couldn't run the software yet, then I noticed that the problem is my java version!
write:
$java -version
in your terminal it will show you the actual version your system is using, It must be java8 for running this software if it's not, try to downgrade or upgrade it to java8
I hope it helps you! GL!
Here I followed revel FW document and installed successfully. But try to use revel command in both Git bash and cmd, it is not working
Please anyone give some suggestion for that...
Run: go get github.com/revel/revel
Run: go get github.com/revel/cmd/revel
Now revel should be available from any place. If not, make sure you have $GOPATH/bin set.
P.S.
If have problems installing github.com/revel/cmd/revel, try removing completely github.com/revel, and re-installing both packages.
I know I'm missing something obvious here but...
After following the installation instructions for PlatformIO (using the install script):
$ platformio
gives
command not found: platformio
Same results using pip install platformio (probably what the script uses in the first place, but I thought I'd try anyways)
Please config your CLI tools via this methods:
https://docs.platformio.org/en/latest/installation.html#install-shell-commands
for example:
export PATH=$PATH:~/.platformio/penv/bin
see the link for details