昨天我的应用程序运行良好。当我今天回来推动时,我遇到了 Godeps 找不到某些依赖项的问题。我能够在我的本地机器上很好地安装 godep,这让我相信这是某种类型的 PCF 问题。
go push
输出:
Starting app business-service in org pcfdev-org / space pcfdev-space as user...
Downloading dotnet_core_buildpack_beta...
Downloading go_buildpack...
Downloading nodejs_buildpack...
Downloading ruby_buildpack...
Downloading staticfile_buildpack...
Downloaded ruby_buildpack
Downloading python_buildpack...
Downloaded go_buildpack
Downloading php_buildpack...
Downloaded nodejs_buildpack
Downloading binary_buildpack...
Downloaded dotnet_core_buildpack_beta
Downloading java_buildpack...
Downloaded binary_buildpack
Downloaded php_buildpack
Downloaded python_buildpack
Downloaded staticfile_buildpack
Downloaded java_buildpack
Creating container
Successfully created container
Downloading app package...
Downloaded app package (9.1K)
Staging...
-------> Buildpack version 1.7.10
file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_godep_godep-v74-linux-x64.tgz
file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_glide_glide-v0.11.0-linux-x64.tgz
-----> Checking Godeps/Godeps.json file.
-----> Installing go1.6.3... done
Downloaded [file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___storage.googleapis.com_golang_go1.6.3.linux-amd64.tar.gz]
!! Installing package '.' (default)
-----> Running: godep go install -v -tags cloudfoundry --buildmode=pie .
server/server.go:4:2: cannot find package "gopkg.in/gin-gonic/gin.v1" in any of:
/tmp/cache/go1.6.3/go/src/gopkg.in/gin-gonic/gin.v1 (from $GOROOT)
/tmp/app/.heroku/go/src/business-service/Godeps/_workspace/src/gopkg.in/gin-gonic/gin.v1 (from $GOPATH)
/tmp/app/.heroku/go/src/gopkg.in/gin-gonic/gin.v1
godep: go exit status 1
Failed to compile droplet
Exit status 223
Staging failed: Exited with status 223
Destroying container
Successfully destroyed container
Godeps.json:
{
"ImportPath": "business-service",
"GoVersion": "go1.6",
"GodepVersion": "v74",
"Deps": [
{
"ImportPath": "github.com/gin-gonic/gin/binding",
"Comment": "v1.0-2-g3900df0",
"Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1"
},
{
"ImportPath": "github.com/gin-gonic/gin/render",
"Comment": "v1.0-2-g3900df0",
"Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1"
},
{
"ImportPath": "github.com/golang/protobuf/proto",
"Rev": "98fa357170587e470c5f27d3c3ea0947b71eb455"
},
{
"ImportPath": "github.com/manucorporat/sse",
"Rev": "ee05b128a739a0fb76c7ebd3ae4810c1de808d6d"
},
{
"ImportPath": "golang.org/x/net/context",
"Rev": "65dfc08770ce66f74becfdff5f8ab01caef4e946"
},
{
"ImportPath": "gopkg.in/gin-gonic/gin.v1",
"Comment": "v1.0",
"Rev": "2dae550eb5392006a4582ce9c90016a9b5a74e8b"
},
{
"ImportPath": "gopkg.in/go-playground/validator.v8",
"Comment": "v8.18.1",
"Rev": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c"
},
{
"ImportPath": "gopkg.in/yaml.v2",
"Rev": "a5b47d31c556af34a302ce5d659e6fea44d90de0"
}
]
}