mcollina / heroku-buildpack-graphicsmagick

67 stars 77 forks source link

Issue with Heroku Cedar 16 #27

Open james-lukensow opened 7 years ago

james-lukensow commented 7 years ago

Just noticed that heroku upgraded our instance to cedar 16, and now all GM commands are failing:

error: Worker 12: Error: Command failed: gm: error while loading shared libraries: libjasper.so.1: cannot open shared object file: No such file or directory

Downgrading to cedar 14 then resolved the issue. Just a FYI.

funkenstrahlen commented 7 years ago

@benalavi Is there any chance you can fix this? I would really like to use this on Cedar 16.

funkenstrahlen commented 7 years ago

@whnunlife Did you manage to get it working on cedar 16 now?

benalavi commented 7 years ago

I have not had time to build this on cedar-16 yet, but if you just need to use gm, possibly without the additional libraries compiled in, you can try the apt buildpack and install gm via apt rather than this build.

The apt buildpack: https://github.com/heroku/heroku-buildpack-apt

On Wed, Apr 26, 2017 at 6:34 AM Stefan Trauth notifications@github.com wrote:

@whnunlife https://github.com/whnunlife Did you manage to get it working on cedar 16 now?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/mcollina/heroku-buildpack-graphicsmagick/issues/27#issuecomment-297409938, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAdMaF0H0leTGPE2SgUkRuPzV5QyOWnks5rz0f2gaJpZM4Mkt7H .

funkenstrahlen commented 7 years ago

@benalavi I want to use this to work with parse-image on my parse server backend. I am not sure if it is enough to install gm via apt in this case. Do you know that?

I will have a try...

funkenstrahlen commented 7 years ago

It works perfectly! And I think using apt to install the packages is also the better solution.

This is what my Aptfile looks like if anyone else does want to use this way to get graphicsmagick working on Heroku:

graphicsmagick
libpng-dev
zlib1g-dev
james-lukensow commented 7 years ago

@funkenstrahlen No, the only solve for our project was to downgrade to cedar 14.

funkenstrahlen commented 7 years ago

@whnunlife What problem do you see? Works perfectly for me.

james-lukensow commented 7 years ago

@funkenstrahlen I haven't tried, it's been 2 month and the site has already launched.

All I can remember, is that when we started dev, we were on Cedar 14, during that time, Heroku upgraded to Cedar 16 and then our ffmpeg commands started failing:

I do have a copy of the error from slack that was being reported:

error: Worker 12: Error transcoding videos for user  58d1f76422222e000c3a2835
2017-03-22T04:02:49.613864+00:00 app[worker.2]: error: Worker 12:  Error: Command failed: gm: error while loading shared libraries: libjasper.so.1: cannot open shared object file: No such file or directory
arathael commented 7 years ago

@whnunlife Hey man I got the same problem as you, so I included libjasper-dev into my Aptfile and voilá.

graphicsmagick
libpng-dev
zlib1g-dev
libjasper-dev
ghost commented 7 years ago

@arathael Thank you man! This solved my problem as well.

gabrielgilini commented 7 years ago

I feel like the unlucky one. Even after trying the apt buildpack and copying the exact same Aptfile as above my node calls to GraphicsMagick through aheckmann/gm keep raising the same error:

Error: Command failed: gm: error while loading shared libraries: libjasper.so.1: cannot open shared object file: No such file or directory

Worth mentioning that it works as intended locally.

I even tried switching to cedar-14, which gave me a different exception:

Error: Command failed: gm: /usr/lib/x86_64-linux-gnu/libgomp.so.1: version `GOMP_4.0' not found (required by /app/.apt/usr/lib/libGraphicsMagick-Q16.so.3)

I'm opening a ticket on Heroku's support page, but if anyone has a clue of what can I try next it'd be appreciated.

Build log

-----> Updating apt caches
       Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
       Get:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease [46.4 kB]
       Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
       Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
       Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,558 kB]
       Get:6 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 Packages [102 kB]
       Get:7 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9,827 kB]
       Get:8 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [440 kB]
       Get:9 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [204 kB]
       Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [799 kB]
       Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [666 kB]
       Fetched 14.1 MB in 2s (6,357 kB/s)
       Reading package lists...
-----> Fetching .debs for graphicsmagick
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libgraphicsmagick-q16-3 libwebp5
       Suggested packages:
         graphicsmagick-dbg
       The following NEW packages will be installed:
         graphicsmagick libgraphicsmagick-q16-3 libwebp5
       0 upgraded, 3 newly installed, 0 to remove and 6 not upgraded.
       Need to get 0 B/1,859 kB of archives.
       After this operation, 8,987 kB of additional disk space will be used.
       Download complete and in download only mode
W: --force-yes is deprecated, use one of the options starting with --allow instead.
-----> Fetching .debs for libpng-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 6 not upgraded.
       Need to get 0 B/184 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Download complete and in download only mode
W: --force-yes is deprecated, use one of the options starting with --allow instead.
-----> Fetching .debs for zlib1g-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 6 not upgraded.
       Need to get 0 B/168 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Download complete and in download only mode
W: --force-yes is deprecated, use one of the options starting with --allow instead.
-----> Fetching .debs for libjasper-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 6 not upgraded.
       Need to get 0 B/520 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Download complete and in download only mode
W: --force-yes is deprecated, use one of the options starting with --allow instead.
-----> Installing graphicsmagick_1.3.18-1ubuntu3_amd64.deb
-----> Installing graphicsmagick_1.3.23-1build1_amd64.deb
-----> Installing libgraphicsmagick3_1.3.18-1ubuntu3_amd64.deb
-----> Installing libgraphicsmagick-q16-3_1.3.23-1build1_amd64.deb
-----> Installing libjasper1_1.900.1-14ubuntu3.4_amd64.deb
-----> Installing libjasper-dev_1.900.1-14ubuntu3.4_amd64.deb
-----> Installing libjasper-dev_1.900.1-debian1-2.4ubuntu1.1_amd64.deb
-----> Installing libpng12-dev_1.2.50-1ubuntu2.14.04.2_amd64.deb
-----> Installing libpng12-dev_1.2.54-1ubuntu1_amd64.deb
-----> Installing libwebp5_0.4.4-1_amd64.deb
-----> Installing zlib1g-dev_1%3a1.2.8.dfsg-1ubuntu1_amd64.deb
-----> Installing zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files
-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=false
       NODE_VERBOSE=false
       NODE_ENV=staging
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       engines.yarn (package.json):  unspecified (use default)

       Resolving node version 6.x...
       Downloading and installing node 6.11.2...
       Using default npm version: 3.10.10
       Resolving yarn version (latest)...
       Downloading and installing yarn (0.28.4)...
       Installed yarn 0.28.4
-----> Restoring cache
       Skipping cache restore (new-signature)
-----> Building dependencies
       Installing node modules (yarn.lock)
       yarn install v0.28.4
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       warning fsevents@1.0.17: The platform "linux" is incompatible with this module.
       info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       [4/4] Building fresh packages...
       success Saved lockfile.
       $ npm run deploy

       > [redacted] deploy /tmp/build_faa8c53ab2cb6c7b774e20221c77579f
       > webpack --progress --config webpack.production.config.js

 67% 825/865 buil       Version: webpack 1.14.0
       Time: 56166ms
       Asset     Size  Chunks             Chunk Names
       bundle.js  1.78 MB       0  [emitted]  main
       bundle.js.map  11.6 MB       0  [emitted]  main
       [0] multi main 28 bytes {0} [built]
       + 982 hidden modules

       WARNING in bundle.js from UglifyJs
---------------------[snipped]---------------------
       Done in 97.91s.
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 53.5M
-----> Launching...
       Released v21
ozivnustka commented 7 years ago

For me helps to add to Aptfile:

graphicsmagick
libpng-dev
zlib1g-dev
libjasper-dev
libjasper1
maratnek commented 7 years ago

Thanks=) My gm had worked!

PakanAngel commented 6 years ago

Hi Can anybody help how to add libjasper to my aptfile. I am new to heroku and using a cedar 16 and can not rollback to a cedar 14. How can I get Graphicsmagick run in my app?

interdigitize commented 6 years ago

The Aptfile worked for me too. Thanks!

adamreisnz commented 6 years ago

I am using the above Aptfile with all the extra packages, and everything worked fine until recently. Now my app is barking that gm.resize is not a function. I presume something is still going wrong with the installation of Graphicsmagick on Heroku.

Anyone having any issues with it recently? Anything that changed on Heroku?

When I ssh into the dyno it does appear gm is installed:

~ $ gm
GraphicsMagick 1.3.23 2015-11-07 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2015 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Usage: gm command [options ...]
adamreisnz commented 6 years ago

Seems to have been an issue with imagemin-gm's latest version. Have raised an issue there. https://github.com/fhemberger/imagemin-gm/issues/9

bogini commented 5 years ago

For those having issues running this on newer Heroku stacks, I was able to get it working on heroku-18: bogini/heroku-buildpack-graphicsmagick

adamreisnz commented 5 years ago

That worked for me on heroku 18.