我无法让我的金刚进程通过暴发户来运行。
这是我的预言--
/go
/src
/print.io
/geo
main.go
/geodomain
[.. files ..]我的gopath设置为上面的/go dir。
在/geo文件夹中,我可以运行go run main.go,它可以工作。
但是,使用下面的upstart配置它的日志记录main.go:8:2: import "print.io/geodomain": cannot find package--
为什么它不像我手动运行命令时那样从upstart开始工作呢?
description "go-server"
author "micah smith"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [!2345]
respawn
script
chdir ~/go/src/print.io/geo/
exec go run main.go
end script发布于 2013-09-30 20:58:34
从评论中惊醒:
当通过Upstart调用时,是否可能没有设置
GOPATH?尝试编译您的程序(go build)并将其放到您的普通PATH上。
https://stackoverflow.com/questions/19102349
复制相似问题