"Make failed" when installing Imagick on MacOS Monterey with M1 chip - imagemagick

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

Related

How to install legacy telepresence version on mac os

I installed the newest release of telepresence by
brew install datawire/blackbird/telepresence
However my scripts are using some legacy telepresence commands that are no longer supported -
The following flags used don't have a direct translation to Telepresence: --serviceaccount --also-proxy --also-proxy --also-proxy --also-proxy
I have not been able to find a way to install an old version of telepresence on mac os.
My preference would to be to use brew but this does not look possible.
brew install telepresence-legacy
brew unlink telepresence
wget https://raw.githubusercontent.com/datawire/homebrew-blackbird/1797069a468a4b056edbfcaf63e9ac665470cdaf/Formula/telepresence.rb
brew install ./telepresence.rb
I found this here
installing-old-version-telepresence-macos/

Imagick extension not enabled on the browser version of php in mac mojave

I am using mac mojave with the following configuration.
Apache2 - Installed from default
phph 7.3.8 - installed from brew
imagick - installed from brew
Now the issue is that the imagick extension is not loaded on the browser version of php. When i am checking the cli version all this extensions are enabled.
I have tried to restart the apache and all
Any guess or suggestions to resolve this issue?
php installed by homebrew doesn't have Imagick extension builtin. You should install the extension with pecl manually.
brew install imagemagick
brew install pkg-config
pecl install imagick
After that, check php.ini to make sure extension = "imagick.so" exist.

How to compile Imagick with libwebp for Webp image support

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.

Homebrew - Python3.7 replace Python3.6.5 if you brew install opencv2

I installed Python 3.6 using a direct link (brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rbbrew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb), since Brew now install by default 3.7 version, if I use brew install python3
Although if I install OpenCv2 from Brew; I get also Python 3.7, and that version get linked as default, moving 3.6 aside. I did try to brew link the previous version, but then when I import cv2, I get an error that the package does not exist.
If I run brew install opencv It tell me that the packages are already installed; so Python 3.6 can't import it, but 3.7 can.
I thought it is a problem with PATH but even that does not seem to have effect.
is there a way to tell brew to not update python when installing new packages? I am OK with 3.7 being installed; but I would like to be able to use OpenCV2 from both; while now I can only import it using 3.7 and not 3.6
brew pin python will prevent it from being upgraded. OpenCV will need to be installed with --build-from-source since the bottle is built and tested against the latest python formula.

ImageMagick / RMagick - Can't install RMagick 2.13.1. Can't find Magick-config

I used a script to install ImageMagick http://github.com/masterkain/ImageMagick-sl
After a while, I got ImageMagick installed.
Then I ran sudo gem install rmagick and got
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in...
I'm working in OSX Snow Leopard with Ruby 1.9.2 and Rails 3. Any ideas?
I was getting the same error and it got resolved after installing the libmagick9-dev library on ubuntu 11.
Update (Thanks to the commenters - Dec. 2012)
$ sudo apt-get install libmagickwand-dev or $ sudo apt-get install graphicsmagick-libmagick-dev-compat for ubuntu 12
$ sudo apt-get install libmagickwand-dev or $ sudo apt-get install libmagick9-dev for ubuntu 11 or below.
$ yum install ImageMagick-devel for centos
$ brew install imagemagick for Mac OS (using Homebrew)
you need the imagemagick libraries under ubuntu
$ sudo apt-get install libmagickwand-dev
it contains all missing libraires
then run bundle install command
I believe you need the Imagemagick libraries.
If you are using Homebrew (which I'd highly recommend), simply do
$ brew install imagemagick
Then rerun bundle install
Mac OS Mountain Loin (using Homebrew)
download and install http://xquartz.macosforge.org/trac/wiki/X112.7.2
brew install imagemagick
gem install rmagick
sudo apt-get install libmagickwand-dev
works well for Ubuntu 12.10
This is assuming you have installed all other dependencies viz.
sudo apt-get install imagemagick ruby ruby-dev gem`
On CentOS 5.7, I got it to work by first specifying PKG_CONFIG_PATH:
export PKG_CONFIG_PATH=/usr/local/src/ImageMagick-6.7.5-10/magick/
gem install rmagick
For those who got
InitializeMagick() in -lMagickCore... no; -lMagick... no; -lMagick++... no;
this worked for me in OS X 10.8: https://github.com/maddox/magick-installer
From here: RVM + Ruby 1.9.2 + Rmagick + Lion = System Works, RVM Doesn't
Initially, I came around to installing rmagick because it seemed to be a dependency when I tried installing libgtk2.0-dev. I was trying to install that package, because the RGtk2.0 is a requirement for using R package called rattle.
Anyway, none of the above solutions worked for me in installing in my Ubuntu 12.04. Even running sudo apt-get update first didn't seem to help, nor this related posting: Installing rmagick on Ubuntu
I eventually found what works is to troubleshoot using sudo aptitude rather than apt-get.
https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages
I recommend the technique of using aptitude to work through the package installation issue.
On Mac Os X, check if /opt/local/bin is in your PATH. If not:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
sudo gem install rmagick
This worked for me!
I had an issue installing Rmagick gem version 2.13.2 on Debian Jessie. After fighting with the packages in the other answers, I upgraded the version of the Rmagick gem from 2.13.2 to the latest (2.16.0 at time of writing). This installed successfully.
bundle update rmagick
If you tried all solutions, of all posts of whole Internet, have installed and reinstalled many times all indicated packages in all Linux or Mac distributions/versions (even in Windows) and it still not working, close your terminal and open it again. Some times, even if your reload all shell environment, only after I reopen the terminal the bundle install was successfully completed.
After several days of searching, my problema was related to some missing libraries, and the one that get the gem installed was this one:
brew install pkg-config
after this I did my bundle install again and it worked.

Resources