Go fork/exec permission denied error

后端 未结 5 1820
终归单人心
终归单人心 2021-01-04 10:09

I recently installed Go onto our server with CentOS 6.3. The install appears to have gone fine. However I made a test \"hello world\" script, and when I run I get the foll

5条回答
  •  难免孤独
    2021-01-04 10:54

    I encountered this issue today but the solutions above did not work. Mine was fixed by simply running:

    $ export TMPDIR=~/tmp/
    

    then I was able to get the script to run with:

    $ go run hello.go
    hello, world
    

    The only downside is you have to run export TMPDIR every time you want to run an application.

    Kudos to Adam Goforth

提交回复
热议问题