dongtang1918 2014-10-15 11:55
浏览 63
已采纳

在Heroku上使用Imagemagick部署Go应用

I've been trying to deploy a simple Go app with imagick This requires Imagemagick. I've tried using the multi buildpack to install Imagemagick and run my app. This is how my .buildpack looks like:

https://github.com/mcollina/heroku-buildpack-imagemagick
https://github.com/kr/heroku-buildpack-go.git

And this is the error I see on 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
  • 写回答

2条回答 默认 最新

  • dongzhuo6137 2014-11-02 13:42
    关注

    I ended up using the image package from Go's excellent standard lib instead of depending on imagemagick.

    This also taught me a valuable lesson about looking for a solution as close to the problem as possible than trying to solve it with a tool that I'm most familiar with.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么