Comments (20)
Please run bundle exec image_optim --info
and see if image_optim_pack succeeded and if bins except pngout
and svgo
are resolved to those provided by image_optim_pack
from image_optim_pack.
It gave me this:
image_optim v0.25.0
config:
verbose: true
nice: 10
threads: 2
pack: true
skip_missing_workers: true
allow_lossy: false
cache_dir:
cache_worker_digests: false
image_optim_pack: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, pngcrush from /home/ctgs/shared/bundle/ruby/2.4.0/gems/image_optim_pack-0.5.0.20170831-x86_64-linux/vendor/linux-x86_64 failed
No pack for this OS and/or ARCH, check verbose output
pngcrush worker: `pngcrush` not found; please provide proper binary or disable this worker (--no-pngcrush argument or `:pngcrush => false` through options)
pngout worker: `pngout` not found; please provide proper binary or disable this worker (--no-pngout argument or `:pngout => false` through options)
advpng worker: `advpng` not found; please provide proper binary or disable this worker (--no-advpng argument or `:advpng => false` through options)
optipng worker: `optipng` not found; please provide proper binary or disable this worker (--no-optipng argument or `:optipng => false` through options)
pngquant worker: `pngquant` not found; please provide proper binary or disable this worker (--no-pngquant argument or `:pngquant => false` through options)
jhead worker: `jhead` not found, `jpegtran` not found; please provide proper binary or disable this worker (--no-jhead argument or `:jhead => false` through options)
jpegoptim worker: `jpegoptim` not found; please provide proper binary or disable this worker (--no-jpegoptim argument or `:jpegoptim => false` through options)
jpegtran worker: `jpegtran` not found; please provide proper binary or disable this worker (--no-jpegtran argument or `:jpegtran => false` through options)
gifsicle worker: `gifsicle` not found; please provide proper binary or disable this worker (--no-gifsicle argument or `:gifsicle => false` through options)
svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
Workers by format:
from image_optim_pack.
A bit weird that image_optim_pack
warning doesn't mention pngquant
.
Can you please check if the binaries in that vendor subfolder are executable?
I have a feeling that something may be wrong with standard libraries, can you also run ldd on those binaries?
from image_optim_pack.
Here's the directory listing:
total 2.3M
drwxrwxr-x 2 ctgs ctgs 4.0K Sep 11 11:28 ./
drwxrwxr-x 3 ctgs ctgs 4.0K Sep 11 11:28 ../
-rwxr-xr-x 1 ctgs ctgs 344K Sep 11 11:28 advpng*
-rwxr-xr-x 1 ctgs ctgs 224K Sep 11 11:28 gifsicle*
-rwxr-xr-x 1 ctgs ctgs 77K Sep 11 11:28 jhead*
-rwxr-xr-x 1 ctgs ctgs 39K Sep 11 11:28 jpegoptim*
-rwxr-xr-x 1 ctgs ctgs 535K Sep 11 11:28 jpeg-recompress*
-rwxr-xr-x 1 ctgs ctgs 47K Sep 11 11:28 jpegtran*
-rwxr-xr-x 1 ctgs ctgs 300K Sep 11 11:28 libjpeg.so*
-rwxr-xr-x 1 ctgs ctgs 249K Sep 11 11:28 libpng.so*
-rwxr-xr-x 1 ctgs ctgs 112K Sep 11 11:28 libz.so*
-rwxr-xr-x 1 ctgs ctgs 101K Sep 11 11:28 optipng*
-rwxr-xr-x 1 ctgs ctgs 115K Sep 11 11:28 pngcrush*
-rwxr-xr-x 1 ctgs ctgs 84K Sep 11 11:28 pngquant*
ldd on any of those returns not a dynamic executable
from image_optim_pack.
If I understand correctly it is either caused by 64 bit binaries on 32 bit system or shared libraries problem. What does uname -i
output for you?
from image_optim_pack.
x86_64
from image_optim_pack.
from image_optim_pack.
When I try to run one of those I just get
./jhead: No such file or directory
pngquant gives the same
from image_optim_pack.
from image_optim_pack.
Yeah, it's weird. I did the same using the full path. I think there might be something going on with the 64 vs 32 bit thing. I might have a 64-bit kernel and 32-bit environment? If I run file /usr/bin/file
I get /usr/bin/file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0428d646fd1bffff284d958f48e0d76a8f90f3e1, stripped
from image_optim_pack.
from image_optim_pack.
Sure, where do I find those? I can't see them in your repos
from image_optim_pack.
Every version of gem has variants with different platform. It seems adding platform option in gemfile works: gem 'image_optim_pack', platform: 'ruby'
. Or you can remove other versions of gem and manually install platform specific one: gem install image_optim_pack --platform=i686-linux
and bundle should pick that one.
Also it is interesting what does gem environment
output in section "RUBYGEMS PLATFORMS" on your server and what does bundle platform
output (the values are probably related)? It seems that your issue arrises from the fact that rubygems expect your system to be 64 bit, but it is not.
from image_optim_pack.
Thanks for your help. I haven't managed to get it to work and am probably going to give up as it's taking too much time. I'm contemplating reinstalling Ubuntu to get everything 64-bit for simplicity in the future.
gem environment
RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
bundle platform
Your platform is: x86_64-linux
from image_optim_pack.
When creating platform specific gems I knew that there may be some problems, as too my knowledge bundler doesn't give any way of selecting which platform specific version to use, but I wanted to considerably reduce the gem size.
Normally if you have some gem already installed (and gem command allows you to specify platform) and bundler is allowed to use system gems, it should use that version. But it seems your environment is tricky for rubygems/bundler.
from image_optim_pack.
I encountered this error, too. I replied to the StackOverflow question:
https://stackoverflow.com/a/50695884/1407170
In my case, the issue was that the binaries in image_optim_pack required a newer version of glibc than was available on my system. My workaround (short up upgrading my Linux distribution, which I plan to do soon) was to install the latest version of image_optim_pack that worked, which appeared to be version 0.2.3. (The 0.3 chain could also work; didn't test between 0.2.3 and 0.5.0)
from image_optim_pack.
@sffc Last compatible version should be 0.3.1.20170318 as I've switched from centos to ubuntu in be36a52 and rebuilt all binaries in 0cdae11 before releasing 0.4.0. I'll check what can be done about required glibc version.
from image_optim_pack.
@sffc Please try version on branch centos-6.9.
from image_optim_pack.
I put this in my Gemfile and then ran bundle install:
gem "image_optim_pack", :git => "git://github.com/toy/image_optim_pack.git", :branch => "centos-6.9"
Output of bundle exec image_optim --info
:
image_optim v0.26.1
config:
verbose: true
nice: 10
threads: 4
pack: true
skip_missing_workers: true
allow_lossy: false
cache_dir:
cache_worker_digests: false
image_optim_pack: all bins from /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64 worked
Resolved pngcrush 1.8.13 at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/pngcrush
Resolved advpng 2.1 at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/advpng
Resolved optipng 0.7.7 at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/optipng
Resolved pngquant 2.12.0 at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/pngquant
Resolved jhead 3.00 at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/jhead
Resolved jpegtran 9c at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/jpegtran
Resolved jpegoptim 1.4.6 at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/jpegoptim
Resolved jpegrescan 1a762f62 at /path/to/.rvm/gems/ruby-2.4.0/gems/image_optim-0.26.1/vendor/jpegrescan
Resolved gifsicle 1.91 at /path/to/.rvm/gems/ruby-2.4.0/bundler/gems/image_optim_pack-f868817156b1/vendor/linux-x86_64/gifsicle
pngout worker: `pngout` not found; please provide proper binary or disable this worker (--no-pngout argument or `:pngout => false` through options)
svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
Workers by format:
( ... )
So it looks like the branch works. 😃 Thanks for keeping support for older OSs!
from image_optim_pack.
@sffc v0.5.1 is out
from image_optim_pack.
Related Issues (20)
- Add archive checksum verification
- Error: uninitialized constant EXIFR::JPEG HOT 1
- Windows support HOT 4
- image_optim_pack-0.5.0.20171208: uninitialized constant ImageOptim::BinResolver::Bin::Date HOT 3
- Doesn't build on OS X HOT 9
- Remove (nearly-)unused platforms
- Request for help with imagemagick with heic support 😬 HOT 1
- Optimized version guetzli with CUDA & OpenCL
- pngout and svgo not found (with default options) HOT 2
- Unable to use the platform-specific (x86_64-linux) version of image_optim_pack HOT 11
- pngcrush worker: `pngcrush` not found; please provide proper binary or disable this worker HOT 2
- jpegtran from mozjpeg made slightly small files HOT 3
- pngout licence changed? Maybe can be packaged now? HOT 2
- Docker. Debian. Some additional libs are required HOT 3
- Debian [ARM64] `jpeg-recompress` and `oxipng` require `/lib64/ld-linux-x86-64.so.2` HOT 7
- switch to rust version of pngquant
- webp binaries HOT 2
- Add Google Guetzli optimizer HOT 1
- Create task/script to check shared libraries of build binaries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image_optim_pack.