I have ImageMagick, Imagick and Webp library installed locally on OSX and trying to save images as Webp with the Intervention Image library, but receiving the following error:
Webp format is not supported by Imagick installation.
After looking at the Intervention Image documentation (http://image.intervention.io/getting_started/formats) I can see that the Imagick extension needs to be 'compiled with libwebp support', however there is no instructions for doing this and after much searching I cannot find a solution
I have Imagick installed via pecl - there doesn't seem to be an install flag such as --with-libwebp as it seems there used to be for installing using brew
PHP Version: 7.2
ImageMagick version: 7.0.8-53
Imagick version: 3.4.4
OSX Version: 10.14.5
You have to install libwebp with Imagemagick, not Imagick.
I do not think you need to do anything special in the Imagemagick .configuration file using --with libwebp, when compiling it from source with webp.
I am on OSX Sierra. I install all my delegates from MacPorts and then installed Imagemagick 7.0.8.53 from source. That works well for me. All that I need is to have MacPorts install libwebp along with all my other desired delegates. Here is my configuration file. Note there is no special --with webp included.
./configure CC=/opt/local/bin/clang-mp-3.9 CXX=/opt/local/bin/clang++-mp-3.9 \
CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-openmp \
--enable-delegate-build --enable-shared --disable-static --disable-opencl \
--with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
--disable-silent-rules --disable-dependency-tracking --without-pango \
--with-lqr --with-gslib --with-gs-font-dir=/opt/local/share/ghostscript/fonts/
I simply do the .configuration ...
Then make clean
Then make
Then sudo make install
I do not know how to install libwebp once you already have your Imagemagick binary installed.
Related
I use Laravel Valet. I'm trying to install the Image Magick PHP extension (PHP 7.4). I get as far as this:
pecl install imagick
And I get the error make failed.
I'm on MacOS Monterey with the Apple Silicon M1 chip.
Any tips?
To install imagick using pecl:
Install imagemagick
brew install imagemagick
Then install imagick using pecl.
pecl install imagick
Also, I maintain a brew tap shivammathur/extensions you can use instead. It has pre-compiled commonly used PHP extensions.
Installing imagick on PHP 7.4 using the tap is as simple as:
brew tap shivammathur/extensions
brew install imagick#7.4
In my Rails app, I just removed Rmagick and added Minimagick. Rmagick was too heavy. Things worked fine with Rmagick but in minimagick I get the following error :
MiniMagick::Invalid: `identify /tmp/mini_magick20150518-10411-1qz42x8` failed with error:
identify.im6: no decode delegate for this image format `/tmp/mini_magick20150518-10411-1qz42x8' # error/constitute.c/ReadImage/544.
from /home/pubudu/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mini_magick-4.2.4/lib/mini_magick/image.rb:200:in `rescue in validate!'
The file url :
[8] pry(main)> file.file.file
=> "/home/pubudu/Projects/istockseller/public/store/photos/thpubs/istockseller-13642162-wallhaven-61582.jpg"
The code im trying to run :
MiniMagick::Image.read(file.file.file).first
Try to reinstall ImageMagick and add --with-jpeg=yes to the configuration.
Run convert -list configure, and see if you have jpeg under DELEGATES. If not, reinstall ImageMagick and add params to ./configure:
1. wget http://www.imagemagick.org/download/ImageMagick.tar.gz
2. tar xvfz ImageMagick.tar.gz
3. cd ImageMagick
4. ./configure --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-shared
5. make
6. sudo make install
7. sudo ldconfig /usr/local/lib
8. run again "convert -list configure" and look at changes
for more information: Carrierwave Error Msg: Failed to manipulate with MiniMagick, maybe it is not an image?
I experienced the same thing on my Ubuntu server. However, I solved it by adding ghostscript and libgs-dev to my Dockerfile apt-get lines
FROM ruby:2.5.3
RUN apt-get update -qq && apt-get install -y \
ghostscript libgs-dev imagemagick
Now i am working on rails 3.0.0.i am using Ubuntu 11.10 ,64 bit os.i want to install wkhtmltopdf.please tell me the static version of wkhtmltopdf.
Installing wkhtmltopdf
on Ubuntu Linux machine
First check os is 32 bit or 64 bit by using following command
Try uname -m. It seems like the uname -m actually gives x86_64 when it is an kernel 64 bits
Run following command
sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev
Then run following command
sudo apt-get install wkhtmltopdf
Based on OS download wkhtmltopdf package from following site
http://code.google.com/p/wkhtmltopdf/downloads/list
OR
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
(wkhtmltopdf-0.9.9-static-i386.tar.bz2 is a stable release for wkhtmltopdf )
Then extract using command
tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
Then move extracted DIR to usr/local/bin folder
sudo mv wkhtmltopdf-i386 /usr/local/bin/wkhtmltopdf
Check wkhtmltopdf is install or not using following command
which wkhtmltopdf
wkhtmltopdf –help
Installing wkhtmltopdf on MacOs
brew install Caskroom/cask/wkhtmltopdf
Another way to use official binaries within Rails is adding the following line to your Gemfile:
gem 'wkhtmltopdf-installer'
This way the official binaries from http://wkhtmltopdf.org will be downloaded and added to your bundle during bundle install phase.
I encountered this problem this morning.
Before you do anything, please check out: https://github.com/pdfkit/pdfkit/wiki/Installing-WKHTMLTOPDF
Download a binary edition of wkhtmltopdf at http://code.google.com/p/wkhtmltopdf/downloads/list
Decompress the package.
Copy the file like wkhtmltopdf-i386 to /usr/local/bin/ & /opt/ (also you could make soft link).
That's done.
Good luck.
I didn't know that installing ruby is such a pain
After lot of trouble with curl certificate, I installed the rvm using the methods mentioned in the rvm site also with lot of help from stackoverflow questions.
Now I am trying to install rails using the gems command
gem install rails
but I always get this error
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
I did follow every thing mentioned here https://rvm.beginrescueend.com/packages/zlib/
and also as a mentioned in a stackoverflow post
I did install all the tools as required by the requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
But still I get this error. When I looked at the build log for ruby under
/usr/local/rvm/log/ruby-1.9.3-p125/configure.log
I see this error
[2012-04-07 01:13:44] ./configure --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-zlib --with-opt-dir=/usr/local/rvm/usr --with-libyaml
configure: WARNING: unrecognized options: --with-zlib, --with-libyaml
Is the rvm broken ? or is there a problem while building the ruby src.
Note: I am running fedora 14
RVM causes more problems than it solves (IMHO). Better tools are ruby-build and rb-env. Newer tools that look very good too are ruby-install and chruby.
Here are my notes from my recent Red Hat Enterprise Linux (RHEL) installation of Ruby, which I believe is pretty similar to Fedora. Perhaps these notes can be of some help to you. Ask me questions if you like.
Install zlib
yum install zlib zlib-devel
Install YAML
export k=yaml v=0.1.4
wget http://pyyaml.org/download/libyaml/$k-$v.tar.gz
tar zxvf $k-$v.tar.gz
cd $k-$v
./configure
make && make install
Install X11 if you want X or headless browsing for testing
yum install
xorg-x11-fonts-misc
xorg-x11-fonts-truetype
xorg-x11-server-Xorg
xorg-x11-server-Xvfb
Install libraries
yum install
gdbm gdbm-devel
ncurses ncurses-devel
openssl openssl-devel
readline readline-devel
tk tk-devel
libjpeg libjpeg-devel
libpng libpng-devel
libxml2 libxml2-devel
libxslt libxslt-devel
zlib zlib-devel
Install ruby-build
cd /opt
git clone git://github.com/sstephenson/ruby-build.git
cd ruby-build/
./install.sh
Install Ruby
export k=ruby v=1.9.3-p125
wget http://ftp.ruby-lang.org/pub/ruby/1.9/$k-$v.tar.gz
tar zxvf $k-$v.tar.gz
cd $k-$v
# Either onfigure with defaults...
./configure
# Or configure with custom locations...
./configure --prefix=/opt/$k/$v --enable-shared --with-opt-dir=/opt/yaml/current
make && make check && make install
Environment
Edit /etc/environment to add this:
RUBYOPT='-r rubygems -r psych'
If you put Ruby in a custom directory, also merge this with your existing path:
PATH=/opt/ruby/1.9.3-p125/bin (or wherever you put it)
Load environment:
source /etc/environment
Verify gem runs and you see the intial set of gems:
gem list
Gem update:
gem update --system
I am trying to install RMagick on my slicehost(Linux Hardy)
instead of compile from source, here is what I did:
$ sudo aptitude install -y imagemagick
$ sudo aptitude install -y libmagick9-dev
$ sudo gem install rmagick
After installed, it reads GIF with no problem, however for JPEG and PNG, I keep getting this error:
Magick::ImageMagickError: no decode delegate for this image format
I know it is probably because I don't have libpng and libjpg libraries, but i didn't find guide on how to install these. I compiled libpng and libjpg from source, with no luck, the files are in the /usr/lib, but i still getting the error.
I found this to be very help: how to install rmagick on linux
Try Installing ImageMagick from Source
You definitely want to follow the recommendation here:
http://rmagick.rubyforge.org/install-faq.html#delegate
It's probably more likely that everything is fine, but you need to reconfigure your image magick install after adding the jpeg delegate.