在Heroku上运行pdf2htmlEX [英] Running pdf2htmlEX on Heroku

查看:75
本文介绍了在Heroku上运行pdf2htmlEX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Heroku上运行 pdf2htmlEX .起初,我想到了在具有与Heroku相同堆栈的VM上编译pdf2htmlEX,然后在git repo中包含二进制文件.那是行不通的(我一直在依赖方面遇到问题).

I'm trying to run pdf2htmlEX on Heroku. At first I thought of compiling pdf2htmlEX on a VM with the same stack as Heroku and then including the binary on the git repo. That did not work (I kept getting problems with dependencies).

由于没有专门用于运行pdf2htmlEX的heroku buildpack,我决定尝试使用 heroku-带有heroku-buildpack-ruby heroku buildpack-apt (buildpack- apt在编译和运行时都增加了对基于apt的依赖的支持. pdf2htmlEX软件包不在主要的PPA中(它位于ppa:coolwanglu/pdf2htmlex中),我不能只是将pdf2htmlEX添加到Aptfile中(这是您指定apt依赖项的位置).

As there is no heroku buildpack for running pdf2htmlEX specifically, I decided to try using heroku-buildpack-multi with heroku-buildpack-ruby and heroku buildpack-apt (buildpack-apt adds support for apt-based dependencies during both compile and runtime). The pdf2htmlEX package is not in the main PPA's (it's in ppa:coolwanglu/pdf2htmlex) I couldn't just add pdf2htmlEX to the Aptfile (which is where you specify your apt dependencies).

我最终得到了pdf2htmlEX的依赖项:

I ended up getting the dependencies for pdf2htmlEX:

pdf2htmlex
  Depends: libc6
  Depends: libcairo2
  Depends: libfontforge1
  Depends: libfreetype6
  Depends: libgcc1
  Depends: libpoppler44
  Depends: libstdc++6
  Suggests: ttfautohint

考虑到这一点,我将Aptfile设置如下:

Taking this into account I made my Aptfile the following:

libc6
libcairo2
libfontforge1
libfreetype6
libpoppler44
libgcc1
libstdc++6
ttfautohint
http://ftp.us.debian.org/debian/pool/main/p/pdf2htmlex/pdf2htmlex_0.14.6+ds-1+b1_amd64.deb

问题是,如果我在一次性dyno中收到bash提示并尝试运行 pdf2htmlEX我收到以下错误:

The issue is that if I get a bash prompt in a one-off dyno and try to run pdf2htmlEX I get the following error:

pdf2htmlEX: /app/.apt/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by pdf2htmlEX)
pdf2htmlEX: /app/.apt/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by pdf2htmlEX)
pdf2htmlEX: /app/.apt/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /app/.apt/usr/lib/x86_64-linux-gnu/libpoppler.so.57)

我在stackoverflow上发现的有关此特定错误的几篇文章并不是特别有用.这似乎与libstdc++6有关,但是我不知道如何解决它.

The few articles I found on stackoverflow about this specific error were not particularly helpful. It seems to be something to do with libstdc++6 but I can't figure out how to solve it.

有什么想法吗?另外,如果您知道在heroku上运行pdf2htmlEX的简便方法,请告诉我.

Any ideas? Also, if you know an easier way of running pdf2htmlEX on heroku, please do let me know.

推荐答案

我刚刚开始工作-非常感谢您为我设定了正确的方向的帖子.

I just got this working - many thanks for the post that set me in the right direction.

首先,我最终使用了此软件包,而不是您引用的debian软件包.

First, I ended up using this package from the ppa instead of the debian package you referenced.

问题似乎是您所引用的软件包是针对libstdc ++ 6的不同版本进行编译的,而不是您的libstdc++6行在Aptfile中安装的版本.为了解决此问题,我们用对特定的,最新的.deb的显式引用替换了libstdc++6行-我使用了 此版本托管在内核上. org

It looks like the issue is that the package you referenced was compiled against different versions of libstdc++6 than the one that is installed by your libstdc++6 line in your Aptfile. To fix, we replaced the libstdc++6 line with an explicit reference to a specific, more recent .deb - I used this version hosted on kernel.org

我也替换了libpoppler57参考,但是您可能不需要.

I also replaced the libpoppler57 reference, but you may not need to.

我最后的正常工作的Aptfile:

My final, working Aptfile:

libc6
libfontforge1
libgcc1
libjs-pdf
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-5/libstdc++6_5.3.1-5ubuntu2_amd64.deb
https://mirrors.kernel.org/ubuntu/pool/main/p/poppler/libpoppler57_0.38.0-0.ubuntu1_amd64.deb
https://launchpad.net/~coolwanglu/+archive/ubuntu/pdf2htmlex/+files/pdf2htmlex_0.12-1~git201411121058r1a6ec-0ubuntu1~trusty1_adm64.deb
ttfautohint

希望这会有所帮助!

这篇关于在Heroku上运行pdf2htmlEX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆