在Heroku的第三方包项目

编程入门 行业动态 更新时间:2024-10-06 04:09:08
本文介绍了在Heroku的第三方包项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

将Go项目部署到Heroku时,pq软件包的安装失败。我已经在 heroku buildpack github问题中发布

When deploying a Go project to Heroku, installation of the pq package fails. I've posted this in heroku buildpack github issues as well.

部署时出错:

-----> Running: godep go install -tags heroku ./... gournay.go:10:3: cannot find package "github/lib/pq" in any of: /app/tmp/cache/go1.2.1/go/src/pkg/github/lib/pq (from $GOROOT) /tmp/build_ce268203-801e-4dfc-a56c-d70698d6c5bf/.heroku/g/src/github/andyatkinson/gournay/Godeps/_workspace/src/github/lib/pq (from $GOPATH) /tmp/build_ce268203-801e-4dfc-a56c-d70698d6c5bf/.heroku/g/src/github/lib/pq godep: go exit status 1

去获得和 go install 按预期在本地运行。该项目是在本地建立和运行的。我相信我的包裹结构是正确的,而 GOPATH 和 GOROOT 是正确的。我正在使用下面创建依赖项文件的 godep pq包的源代码似乎被复制到项目中,所以似乎是从该源编译。

go get and go install run locally as expected. The project is built and running locally. I believe my package structure is correct, and GOPATH and GOROOT are correct. I am using godep which creates the dependencies file below. The source for the pq package appears to be copied into the project, so it seems like it would compile from that source.

~/go/src/github/andyatkinson/gournay (master) $ cat Godeps/Godeps.json { "ImportPath": "github/andyatkinson/gournay", "GoVersion": "go1.2.1", "Deps": [ { "ImportPath": "github/lib/pq", "Rev": "c808a1bb644594ca717ac61f71e6b0e454b835e2" } ] }

?还有什么我应该检查的?谢谢!

Am I missing something? Anything else I should check? Thanks!

推荐答案

在开发中运行 godep save

从godep README:

from godep README:

$ godep save This will save a list of dependencies to the file Godeps/Godeps.json, and copy their source code into Godeps/_workspace. Read over its contents and make sure it looks reasonable. Then commit the file to version control.

---更新---

我看到你的回购,并在英雄 warm-depths-3154.herokuapp/ ,按照步骤

I see your repo, and up on heroku warm-depths-3154.herokuapp/, follow the steps

rm -Rf gopack.config .godir .gopack godep save git add --all . // please commit the Godep folder git commit -m 'using godep, removed gopack'

(提交 github/dukex/gournay/commit/0de2390835357879a34ea452a56eeeb6391e5ba8 )

更多推荐

在Heroku的第三方包项目

本文发布于:2023-11-26 09:37:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633590.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:第三方   项目   Heroku

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!