eisenxp / macos-golink-wrapper

solution to "syscall.Mprotect panic: permission denied" on macOS Catalina 10.15.x
MIT License
218 stars 52 forks source link

there is no "tool" file in "opt/go/pkg", what should I do? #2

Open Wang-Yanping1996 opened 3 years ago

Wang-Yanping1996 commented 3 years ago

There is no "tool" file in "opt/go/pkg", what should I do ?

TangliziGit commented 3 years ago

You should find the path which golang installed. For example, my install path is /usr/local/Cellar/go/1.16.3/, so the darwin_amd64 path would be /usr/local/Cellar/go/1.16.3/libexec/pkg/tool/darwin_amd64.

eisenxp commented 3 years ago
echo "$(cd `which go`/../../pkg/tool/darwin_amd64 && pwd)"

Through this command, you can locate the directory.