Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Heroku上部署带有Imagemagick的Go应用程序_Heroku_Go_Imagemagick - Fatal编程技术网

在Heroku上部署带有Imagemagick的Go应用程序

在Heroku上部署带有Imagemagick的Go应用程序,heroku,go,imagemagick,Heroku,Go,Imagemagick,我一直在尝试使用部署一个简单的Go应用程序 这需要Imagemagick。我已尝试使用安装Imagemagick并运行我的应用程序。这就是我的.buildpack的外观: https://github.com/mcollina/heroku-buildpack-imagemagick https://github.com/kr/heroku-buildpack-go.git 这就是我在Heroku身上看到的错误: Fetching repository, done. Counting

我一直在尝试使用部署一个简单的Go应用程序 这需要
Imagemagick
。我已尝试使用安装Imagemagick并运行我的应用程序。这就是我的
.buildpack
的外观:

https://github.com/mcollina/heroku-buildpack-imagemagick
https://github.com/kr/heroku-buildpack-go.git
这就是我在Heroku身上看到的错误:

    Fetching repository, done.
Counting objects: 170, done.
Compressing objects: 100% (154/154), done.
Writing objects: 100% (169/169), 170.13 KiB | 0 bytes/s, done.
Total 169 (delta 21), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/mcollina/heroku-buildpack-imagemagick
=====> Detected Framework:
-----> Installing libpng 1.5.14
       Download completed
       Installation completed
-----> Installing imagemagick 6.8.2-3
       Download completed
       Installation completed
-----> Building runtime environment for imagemagick
=====> Downloading Buildpack: https://github.com/kr/heroku-buildpack-go.git
=====> Detected Framework: Go
-----> Installing go1.3... done
-----> Running: godep go install -tags heroku ./...
# github.com/gographics/imagick/imagick
error: 'RemoveAlphaChannel' undeclared (first use in this function)
error: 'FlattenAlphaChannel' undeclared (first use in this function)
godep: go exit status 2

 !     Push rejected, failed to compile Multipack app

To git@heroku.com:philosoraptor-me.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to

您是否尝试过更新gographics/imagick的本地副本并执行godep更新gographics/imagick?错误
错误:“Flattalphachannel”未声明
似乎来自库而不是构建包

我最终使用了Go优秀标准库中的包,而不是依赖于
imagemagick


这也给了我一个宝贵的教训,那就是寻找尽可能接近问题的解决方案,而不是尝试使用我最熟悉的工具解决问题。

catsby,我尝试在本地运行
godep update github.com/gographics/imagick/imagick
,我没有发现任何错误。我删除了imagick的本地副本并尝试了。我也有同样的问题。。。但是映像包需要与imagemagick不同的代码否?有没有办法让imagemagick发挥作用?@Lion789,是的,你是对的-两者都有不同的功能,但做一些类似的事情。幸运的是,我能够使用其中一个功能来满足我的需求。对不起,我现在没有更好的答案。如果我能弄明白,我会把它贴在这里。