Recently, I was writing a simple JVM virtual machine with go. When compiling, I used go install, and then the command line reminded me
go: go.mod file not found in current directory or any parent directory; see 'go help modules'
The go.mod file cannot be found in the current directory or parent directory
Just execute the following command in your project source directory to solve this problem
go mod init
Go will create a go.mod file in this directory.
Then execute go install to succeed
- fatal: Not a git repository (or any of the parent directories): .git
- [Solved] ImportError:attempted relative import with no known parent package
- Importerror: no module named * [How to Solve]
- Maven Error: Failed to execute goal on project xxx: Could not resolve dependencies for project
- Local workspace file (‘angular.json’) could not be found.
- Redis service failed to start, prompt: redis server: command not found
- Make Command ERROR: “make:*** No targets specified and no makefile found.Stop.” [Three Method to Solve]
- [Solved] Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-9enuqi/My…
- How to Solve Centos Yum Error: No module named yum
- Zsh: command not found: pip3 & pip [How to Solve]