imagick installation on webfaction - imagemagick

I had installed ImageMagick on my local server and it worked perfectly fine. But when I moved to webfaction, and tried installing it on the server I had issues. The ImageMagick is installed on the server but I am not able to install the php extension imagick. I followed the steps and downloaded the tar file from http://pecl.php.net/get/imagick-3.0.1.tgz. I then unzipped the file and its contents and configured it. I also did phpize. But when I did make I got the following errors:
[e#web308 imagick-3.0.1]$ make
/bin/sh /home/e/temp/imagick-3.0.1/libtool --mode=compile cc -I. -I/home/e/temp/imagick-3.0.1 -DPHP_ATOM_INC -I/home/e/temp/imagick-3.0.1/include -I/home/e/temp/imagick-3.0.1/main -I/home/e/temp/imagick-3.0.1 -I/usr/local/include/php54 -I/usr/local/include/php54/main -I/usr/local/include/php54/TSRM -I/usr/local/include/php54/Zend -I/usr/local/include/php54/ext -I/usr/local/include/php54/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /home/e/temp/imagick-3.0.1/imagick_class.c -o imagick_class.lo
mkdir .libs
cc -I. -I/home/e/temp/imagick-3.0.1 -DPHP_ATOM_INC -I/home/e/temp/imagick-3.0.1/include -I/home/e/temp/imagick-3.0.1/main -I/home/e/temp/imagick-3.0.1 -I/usr/local/include/php54 -I/usr/local/include/php54/main -I/usr/local/include/php54/TSRM -I/usr/local/include/php54/Zend -I/usr/local/include/php54/ext -I/usr/local/include/php54/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /home/e/temp/imagick-3.0.1/imagick_class.c -fPIC -DPIC -o .libs/imagick_class.o
/home/e/temp/imagick-3.0.1/imagick_class.c: In function ‘zim_imagick_setfont’:
/home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’
/home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function)
/home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: (Each undeclared identifier is reported only once
/home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: for each function it appears in.)
/home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function)
/home/e/temp/imagick-3.0.1/imagick_class.c: In function ‘zim_imagick_setimageprogressmonitor’:
/home/e/temp/imagick-3.0.1/imagick_class.c:9534: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’
/home/e/temp/imagick-3.0.1/imagick_class.c:9534: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function)
/home/e/temp/imagick-3.0.1/imagick_class.c:9534: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function)
make: *** [imagick_class.lo] Error 1
It says some of the variables are undeclared. I tried with other versions and get the same errors.
Any help on what I might be doing wrong here?
Thanks in advance.

PHP54 won't work with version 3.0.1 you can use the latest version to fix this:
wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar xzvf imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC2
phpize
./configure
make
cp modules/imagick.so /your-php-extensions-directory-path/

The solution is to install the beta version of the module instead:
pear config-set preferred_state beta
pecl install imagick

Related

brew: unable to install mumps on mac

I am trying to install ipopt by:
brew install ipopt.rb --with-openblas
and I got the following error:
==> Installing dependencies for ipopt: mumps
==> Installing ipopt dependency: mumps
==> Downloading http://mumps.enseeiht.fr/MUMPS_5.1.1.tar.gz
Already downloaded: /Users/yufeiliu/Library/Caches/Homebrew/mumps-5.1.1.tar.gz
==> make alllib LIBEXT=.dylib AR= -dynamiclib -Wl,-install_name -Wl,/usr/local/Cellar/mumps/5.1.
Last 15 lines from /Users/yufeiliu/Library/Logs/Homebrew/mumps/01.make:
clang -fPIC -I../include -O -c symbfac.c -o symbfac.o
clang -fPIC -I../include -O -c interface.c -o interface.o
clang -fPIC -I../include -O -c sort.c -o sort.o
clang -fPIC -I../include -O -c minpriority.c -o minpriority.o
dynamiclib -Wl,-install_name -Wl,/usr/local/Cellar/mumps/5.1.1_1/lib/libpord.dylib -undefined dynamic_lookup -o libpord.dylib graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o multisector.o gelim.o bucket.o tree.o symbfac.o interface.o sort.o minpriority.o
make[2]: dynamiclib: No such file or directory
make[2]: [libpord.dylib] Error 1 (ignored)
echo libpord.dylib
libpord.dylib
if [ "./PORD/lib/" != "" ] ; then \
cp ./PORD/lib//libpord.dylib lib/libpord.dylib; \
fi;
cp: ./PORD/lib//libpord.dylib: No such file or directory
make[1]: *** [lib/libpord.dylib] Error 1
make: *** [c] Error 2
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/brewsci/homebrew-science/issues
Does anyone know how to solve this?
Unfortunately installation of mumps package with brew is very problematic at this moment. You have two different ways to install mumps
Method 1:
brew tap brewsci/science
brew install mumps
if that didn't work, download mumps.rb from here
brew install ./mumps.rb
Method 2
brew tap dpo/openblas
brew install mumps
The second method might lead to some issues with scalapack later.
Update: Unfortunately the above method might not work properly anymore. I have updated the installation method here.

Mqtt: How to install mosquitto old version

I have installed mosquitto using the command apt-get install mosquitto. It is installed successfully on my system, but I got version "1.4.5". I want to downgrade to version 1.4.4, so I was trying using the source tar file. Under folder, I am running the command make and it is throwing an error:
set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory `/home/ubuntu/org.eclipse.mosquitto-1.4.4/lib'
cc -Wall -ggdb -O2 -I. -I.. -I../lib -fPIC -DWITH_TLS -DWITH_TLS_PSK -DWITH_THREADING -DWITH_SOCKS -DWITH_SRV -c mosquitto.c -o mosquitto.o
In file included from mosquitto.c:33:0:
./mosquitto_internal.h:27:27: fatal error: openssl/ssl.h: No such file or directory
# include <openssl/ssl.h>
^
compilation terminated.
make[1]: *** [mosquitto.o] Error 1
make[1]: Leaving directory `/home/ubuntu/org.eclipse.mosquitto-1.4.4/lib'
make: *** [mosquitto] Error 2
What is going wrong here?. Is there any another way to install 1.4.4 version of mosquitto?
Thanks
You're missing dependencies needed for compilation.
Try:
apt-get install libc-ares-dev libssl-dev libwrap0-dev uthash-dev uuid-dev
If you want libwebsockets support you can either install libwebsockets-dev, or better install it manually from source - that will get you version 1.5 instead of the old 1.2 that is in Debian/Ubuntu.
If you install the manually compiled version with
make prefix=/usr install
then it will overwrite the existing binary and you can use it with the existing system services.

Luarocks error building luafilesystem

I'm using Luarocks 2.2.0beta1 to install luafilesystem on windows 7 with lua 5.2 and mingw. I got this error:
>luarocks install luafilesystem
Installing http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock...
Using http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock... switching to 'build' mode
mingw32-gcc -O2 -c -o src/lfs.o -IC:/lua/include/src/lfs.c
mingw32-gcc -shared -o lfs.dll src/lfs.o C:/lua/bin/lua52.dll -lm
C:\lua\bin\lua52.dll: file not recognized: File format not recognized
collect2.exe: error: Id returned 1 exit status
Error: Build error: Failed compiling module lfs.dll
any idea how to fix this?
note: until now, I have no problem installing other module with luarocks that have no dependency with luafilesystem.
Solved, this problem arise because actually I'm not using the same MinGW compiler when building lua52.dll. I don't know which compiler I use at the first time. Thanks to #siffiejoe

Unable to install GDAL in python 3 using pip (clang failed with exit status 1)

After running sudo pip3.4 install gdal from terminal (Mac OS X Mavericks) I obtain an error message saying that the 'col_port.h' file was not found and displaying the following error: command '/user/bin/clang/ failed with exit status 1 (the full message is below).
I have gdal 1.11 (the complete framework version downloaded from kingchaos.com) and the most recent version of the Xcode command line tools -Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Here is the error that I get after running the sudo pip3.4 install gdal command:
/usr/bin/clang -fno-strict-aliasing -Werror=declaration-after-statement -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -I/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/1.11/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.6-intel-3.4/extensions/gdal_wrap.o
extensions/gdal_wrap.cpp:2230:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
extensions/gdal_wrap.cpp:2233:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
extensions/gdal_wrap.cpp:2535:22: warning: unused variable 'swig_empty_runtime_method_table' [-Wunused-variable]
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
^
extensions/gdal_wrap.cpp:2855:10: fatal error: 'cpl_port.h' file not found
#include "cpl_port.h"
^
3 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
The solution was to use homebrew and, after that, run pip3.4
brew install GDAL
and, once installed,
pip3.4 install gdal
Had this problem today. Installed GDAL with brew and it failed with pip3. The solution was to make sure that the version you try to install with pip is the same as homebrew has installed.
So first install gdal with homebrew using
brew install gdal
You should be able to see the version that is being installed during installation. If you have already installed gdal before you can check the version with:
brew info gdal
For me this showed that the version of gdal brew installed for me was: 2.4.4
So then you can install the correct version with pip using
pip3 install gdal==2.4.4
This finally worked for me.

"pecl install imagick" fails on mountain lion. can't find "wand/MagickWand.h"

Pretty much what it sounds like. I did:
brew install imagemagick
That seemed to go well--so the problem is not with imagemagick itself.
I then tried to install the PHP extension (updating pear and pecl before trying):
pecl install imagick
It fails. Here's what happens near the end:
running: make
/bin/sh /private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/libtool --mode=compile cc -I. -I/private/tmp/pear/install/imagick -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/include -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/main -I/private/tmp/pear/install/imagick -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/install/imagick/imagick_class.c -o imagick_class.lo
mkdir .libs
cc -I. -I/private/tmp/pear/install/imagick -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/include -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/main -I/private/tmp/pear/install/imagick -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/install/imagick/imagick_class.c -fno-common -DPIC -o .libs/imagick_class.o
In file included from /private/tmp/pear/install/imagick/imagick_class.c:21:
/private/tmp/pear/install/imagick/php_imagick.h:49:12: fatal error: 'wand/MagickWand.h' file not found
# include <wand/MagickWand.h>
^
1 error generated.
make: *** [imagick_class.lo] Error 1
ERROR: `make' failed
Any ideas?? This is only the umpteenth time I've had issues installing imagemagick on a computer. Seems they change little things here and there all the time (for instance, I've never heard of "magickwand" before now).
I complied ImageMagick according to http://www.imagemagick.org/script/install-source.php#unix
Then I followed http://verysimple.com/2011/12/21/install-image-magick-for-php-on-osx/
Had the following error fatal error: 'wand/MagickWand.h' file not found
Then I found http://www.imagemagick.org/discourse-server/viewtopic.php?f=10&t=22644
Had to find the solution in config.m4, it was exporting pkgconfig:
export PKG_CONFIG_PATH="`MagickWand-config --prefix`/lib/pkgconfig/"
Then I configured with the following:
LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure --with-imagick=/usr/local

Resources