【问题标题】:Updating Heroku Buildpack to use ffmpegthumbnailer 2.2.0更新 Heroku Buildpack 以使用 ffmpegthumbnailer 2.2.0
【发布时间】:2017-06-10 15:42:52
【问题描述】:

我正在开发的应用程序当前使用的是使用 ffmpegthumbnailer 2.0.8 的 buildpack,我需要在 2.1.2 版中添加的功能。我已经分叉了我们当前使用的 buildpack 的 repo https://github.com/akomic/heroku-buildpack-ffmpegthumbnailer 并更新了 bin/compile 文件以将 download_url 指向 "https://github.com/dirkvdb/ffmpegthumbnailer/archive/2.2.0.tar.gz" 但是当我将我的分叉 repo 添加到应用程序并运行 heroku run "ffmpegthumbnailer -version" 以验证它成功了,我收到了 bash: ffmpegthumbnailer: command not found 错误。

这里是原文bin/compile

#!/bin/sh

indent() {
  sed -u 's/^/       /'
}

echo "-----> Install ffmpegthumbnailer"
BUILD_DIR=$1
VENDOR_DIR="vendor"
DOWNLOAD_URL="http://www.aksiom.net/stuff/ffmpegthumbnailer_2.0.8-2.bin.tar.gz"

echo "DOWNLOAD_URL = " $DOWNLOAD_URL | indent

cd $BUILD_DIR
mkdir -p $VENDOR_DIR
cd $VENDOR_DIR
curl -L --silent $DOWNLOAD_URL | tar zx

echo "exporting PATH and LIBRARY_PATH" | indent
PROFILE_PATH="$BUILD_DIR/.profile.d/ffmpeg.sh"
mkdir -p $(dirname $PROFILE_PATH)
echo 'export PATH="$PATH:$HOME/vendor/ffmpegthumbnailer_2.0.8-2/bin"' >> $PROFILE_PATH
echo 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/vendor/ffmpegthumbnailer_2.0.8-2/lib"' >> $PROFILE_PATH

这是我在分叉存储库中更新的 bin/compile:

#!/bin/sh

indent() {
  sed -u 's/^/       /'
}

echo "-----> Install ffmpegthumbnailer"
BUILD_DIR=$1
VENDOR_DIR="vendor"
DOWNLOAD_URL="https://github.com/dirkvdb/ffmpegthumbnailer/archive/2.2.0.tar.gz"

echo "DOWNLOAD_URL = " $DOWNLOAD_URL | indent

cd $BUILD_DIR
mkdir -p $VENDOR_DIR
cd $VENDOR_DIR
curl -L --silent $DOWNLOAD_URL | tar zx

echo "exporting PATH and LIBRARY_PATH" | indent
PROFILE_PATH="$BUILD_DIR/.profile.d/ffmpeg.sh"
mkdir -p $(dirname $PROFILE_PATH)
echo 'export PATH="$PATH:$HOME/vendor/ffmpegthumbnailer_2.0.8-2/bin"' >> $PROFILE_PATH
echo 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/vendor/ffmpegthumbnailer_2.0.8-2/lib"' >> $PROFILE_PATH

其他信息:我使用heroku buildpacks:add <link_to_forked_repo>添加构建包

感谢您的帮助!

【问题讨论】:

  • 我正在尝试做同样的事情。你有没有想过这个问题?

标签: ruby-on-rails bash heroku ffmpeg buildpack


【解决方案1】:

这是因为指定的原始 akomic tarball 不是源代码,而是已编译二进制文件和库的自定义 zip。请注意,compile 脚本没有 make 步骤,例如。没有关于如何创建此自定义 tarball 的文档,但大概如果您使用较新版本的源代码完成相同的过程,然后将其上传到该脚本可以访问它的地方,它将再次工作。我现在正在努力解决这个问题。

【讨论】:

    猜你喜欢
    • 2023-03-16
    • 1970-01-01
    • 2012-12-31
    • 2014-09-24
    • 1970-01-01
    • 2020-01-28
    • 2020-01-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多