ImageMagick - PECL issue - Cannot locate header file MagickWand.h - imagemagick

We are getting this error while installing ImageMagick PECL:
checking ImageMagick MagickWand API configuration program... found in
/usr/local/bin/MagickWand-config checking if ImageMagick version is at
least 6.2.4... found version 6.8.6 Q16 checking for MagickWand.h
header file... configure: error: Cannot locate header file
MagickWand.h ERROR: `/root/tmp/pear/imagick/configure --with-imagick'
failed extension imagick.so installed in /usr/local/lib/php.ini
/usr/local/bin/php does not have a php.ini Tidying
/usr/local/cpanel/3rdparty/php/53/etc/php.ini... No changes
Any idea how to fix this ?

This thread is old, but I solved this issue today on a Centos 7 by installing ImageMagick-devel package:
yum install ImageMagick-devel
Hope this helps.

Steps:
apt-get install libmagickwand-dev
/opt/lampp/bin/pecl install imagick
gedit /opt/lampp/etc/php.ini
add "extension=imagick.so" to php.ini

Probably its looking for the file MagickWand.h and unable to see that file in the defined location. Try these steps
wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar zxf imagick-3.1.0RC2.tgz
Edit the file imagick-3.1.0RC2/config.m4 line number 55.
Make changes like this, from
if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h;
to
if test -r $WAND_DIR/include/ImageMagick-6/wand/MagickWand.h;
Note this difference made in the imagick version number. After that try the conventional installation procedures
cd imagick-3.1.0RC2
phpize
./configure
make
make install

Perhaps this http://thomas.bindzus.me/2013/08/11/building-pecl-imagick-for-php-5-5-1-on-centos-6-4/ can be of some help to others.
The solution described by Leo Prince almost worked for me, just had to set PKG_CONFIG_PATH, and perhaps that's just my server setup which isn't as perfect as it should be.
Here is what I did step-by-step (I'm running CentOS 6.4, Apache 2.4.6, and PHP 5.5.1):
wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar zxf imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC
phpize
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure –with-imagick
make
make install
echo extension=imagick.so > /etc/php.d/imagick.ini
service httpd restart
php -m | grep imagick

First run following commands
1. "WHM Home » Software » Rebuild RPM Database"
2. yum install ImageMagick ImageMagick-devel
3. yum install pcre-devel
Then go to
Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the
box below “Install a PHP Pecl” enter “imagick” and click “Install Now”
button – that’s all. Restart Apache.
Above steps worked for me.

Related

Failing to install VEP dependencies

I'm trying to install VEP, but am getting stuck installing its dependencies.
I try to install as suggested here https://www.ensembl.org/info/docs/tools/vep/script/index.html
cd ~/bin
git clone https://github.com/Ensembl/ensembl-vep.git
cd ensembl-vep
perl INSTALL.pl
But I get this error:
ERROR: DBI module not found. VEP requires the DBI perl module to function
http://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
So, I then try and install DBI as suggested here https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
cpanm DBI
But I get this error:
Can't write to cpanm home '/Users/michaelflower/.cpanm': You should fix it with chown/chmod first.
How to I 'fix' it with chown/chmod??
On Ubuntu 20.04 this worked for me:
sudo apt install libdbi-perl
But then I ran into a bunch of other errors which I solved sequentially by doing these things (I restarted the installation after every step but I guess if you first do them all, then it should work in 1 go):
sudo apt update # Or you'll more errors
sudo apt install unzip
sudo apt install build-essential
sudo apt install libbz2-dev liblzma-dev zlib1g-dev
sudo apt install libcam-pdf-perl
cpan Bio::DB:HTS # Takes a while as well
This perl modules wants to install
cpan Bio::SeqFeature::Lite # Takes quite a while
Which wants to install:
cpan XML::DOM XML::Parser::PerlSAX XML::Twig
Which then ultimately fails with:
Files=109, Tests=72, 4 wallclock secs ( 0.28 usr 0.09 sys + 2.29 cusr 0.83 csys = 3.49 CPU)
Result: FAIL
Failed 103/109 test programs. 32/72 subtests failed.
make: *** [Makefile:837: test_dynamic] Error 255
MIROD/XML-Twig-3.52.tar.gz
one dependency not OK (XML::Parser); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MIROD/XML-Twig-3.52.tar.gz
So I try to install XML::Parser
cpan XML::Parser
and it fails too
Note that if you build against a shareable library in a non-standard location
you may (on some platforms) also have to set your LD_LIBRARY_PATH environment
variable at run time for perl to find the library.
No 'Makefile' created TODDR/XML-Parser-2.46.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
I'll ddg some more...
... ok, I just reran to original install command and it crashes with a new message, it wants me to intall LWP::Simple. So I do, on my first attempt it crashed with a permissions error so I add sudo
sudo cpan LWP::Simple
Restarting install...
perl INSTALL.pl
SUCCESS!

install MongoDB C++ Driver problem in ubuntu 16.04

I want to install MongoDB C++ Driver, so first is mongocxx
I follow this installation:
http://mongocxx.org/mongocxx-v3/installation/
but I can not pass step 4
when I run this in mongo-cxx-driver/build
sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
it shows
-- Auto-configuring bsoncxx to use MNMLSTC for polyfills since C++17 is inactive
CMake Error at src/mongocxx/CMakeLists.txt:37 (find_package):
By not providing "Findlibmongoc-1.0.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"libmongoc-1.0", but CMake did not find one.
Could not find a package configuration file provided by "libmongoc-1.0"
(requested version 1.13.0) with any of the following names:
[![enter image description here][1]][1]
libmongoc-1.0Config.cmake
libmongoc-1.0-config.cmake
Add the installation prefix of "libmongoc-1.0" to CMAKE_PREFIX_PATH or set
"libmongoc-1.0_DIR" to a directory containing one of the above files. If
"libmongoc-1.0" provides a separate development package or SDK, be sure it
has been installed.
second question,
Step 2: Choose a C++17 polyfill how can I set MNMLSTC/core?
does anyone can help me,I already trap here for a long time ?
my env:
mongo-c-driver 1.15.1
libmongoc-1.0
mongocxx-3.4.x
Cmake is complaining about not finding a package configuration file (xxx.cmake), probably because you didn't build libmongoc/libbson.
I've tried to reproduce your issue and hit the same problem when I only installed them (apt-get install), so my suggestion is that you get the sources and build them as described at: http://mongoc.org/libmongoc/current/installing.html
Here's the list of commands (with the latest version of mongo-c-driver=1.15.1) which I just tried and worked fine:
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.15.1/mongo-c-driver-1.15.1.tar.gz
tar xzf mongo-c-driver-1.15.1.tar.gz
cd mongo-c-driver-1.15.1
mkdir cmake-build
cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
make
sudo make install
At this point you can go back into mongocxx/build and run again the command you were stuck at:
cd ../../mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..

PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' with Jenkins

I'm getting this warning when running the phpunit test suite in Jenkins pipeline.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' - /usr/lib/php/20160303/pdo_sqlite.so: undefined symbol: sqlite3_column_table_name in Unknown on line 0
However this warning is not thrown when running the test suite directly in terminal.
I have PHP 7.1 in my system and this is the only PHP version I have installed. php7.1-sqlite3 is installed.
Thank you in advance.
As far as I have found out, there is a faulty file in /usr/local/lib called libsqlite3.so.0 which points to libsqlite3.so.0.8.6. I renamed the file in case it was needed for something. With the command:
cd /usr/local/lib
sudo mv libsqlite3.so.0 ./libsqlite3.so.0.back
But you can also delete it:
rm libsqlite3.so.0
The thread that lead me to the answer: link
This solved my problems, and I hope they solve yours as well :)
I had this same issue with PHP 7.1 on Ubuntu 16.04.
Running the following fixed the issue for me:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-sqlite3
Have you built SQLite from source? If yes, enable Column metadata and recompile with
CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure
make
sudo make install
Have fun using the cutting edge SQLite.
Reference - https://www.sqlite.org/compile.html#enable_column_metadata

erlang is no longer supported by Red Hat Enterprise Linux?

I'm trying installing Erlang on my REHL7.2, but unfortunately I failed. I tried two approaches
First I tried downloading a RPM package from official site of erlang (in fact the rpm package is for CentOS, but there's no RPM package for RHEL anyway), but
error: Failed dependencies:
libwx_baseu-2.8.so.0()(64bit) is needed by esl-erlang-19.0-1.x86_64
libwx_baseu-2.8.so.0(WXU_2.8)(64bit) is needed by esl-erlang-19.0-1.x86_64
Then I tried
$ wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
$ rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
But it failed too because
No package erlang available.
Error: Nothing to do
I wonder whether Erlang is no longer supported by RHEL? Otherwise how can I install Erlang on my RHEL7.2?
One simple solution to install the Erlang Solutions package is install the epel repository:
yum install epel-release
Then
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum install erlang
The epel repo contains the libwx_* libraries required.
As instructed here:
enter link description here
Run the following commands (note: the commands on the above link use R15B01, but in the following commands, I changed it to the last release of Erlang (R15B03) It will take a while to finish with the installation. Run commands line by line
sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
wget http://erlang.org/download/otp_src_R15B03.tar.gz
tar zxvf otp_src_R15B03.tar.gz
cd otp_src_R15B03
./configure && make && sudo make install
After everything is done, you will be still at otp_src_R15B03 where Erlang is installed. Type erl and Enter, then, it should run and open Erlang prompt. I tried running Erlang from my home directory and from the root by just typing erl and it worked too. This way, Erlang is working good for me. To quit Erlang press CTRL + g then q and Enter
There is another way to install and useful info on this link:
enter link description here
I have figured it out! I found two solutions.
The first solution which is also the easiest way is to install a zero dependency version of erlang, please refer to my another Question. But I only tried this way after installing erlang from source, so if you failed this way, just try the following soltuion.
The other one is to build erlang from source (or by kerl which is essentially the same thing).
Install necessary dependencies:$sudo yum install ncurses-devel openssl-devel *openjdk-devel unixODBC unixODBC-devel
Download source code of erlang, unzip it and cd into the direcotry
sudo ./configure sudo make sudo make install
Please refer to this article.
Thank you everyone!
Try this, worked for me.
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum install erlang erlang-nox

Installing Rglpk on linux

I am trying to install Rglpk using the install.packages command. I am getting this error :
/bin/sh: line 0: cd: GLPK: No such file or directory
make: *** [GLPK.ts] Error 1
The glpk-dev package is already installed :
rpm -qa| grep glpk-dev
glpk-devel-4.40-1.1.el6.x86_64
Thanks for your help,
Hi what I did was the following as a sudoer
cd usr local
wget http://ftp.gnu.org/gnu/glpk/glpk-4.54.tar.gz
tar xfzv glpk-4.54.tar.gz
mkdir GLPK
./configure
make
make install
then download the Rglpk_0.6-0.tar.gz and install.package the usual way. It is basically the same as what was done here, but as a sudoer:
I got this fixed by running 'sudo make' and 'sudo make install' instead of 'make' and 'make install'. Not sure if this is good practice, someone else be the judge.
cd $HOME
wget http://ftp.gnu.org/gnu/glpk/glpk-4.65.tar.gz
tar xfzv glpk-4.65.tar.gz
mkdir GLPK
./configure
sudo make
sudo make install
Then run install.packages('Rglpk') from within R.
My experience was the following as a sudoer:
install GLPK package: see https://en.wikibooks.org/wiki/GLPK/Linux_OS
install Rglpk:
# install devtools package beforehand. Or, you can download the Rglpk package manually, and then install in R.
# note that the latest version of Rglpk does not work on my Redhat system. Instead, the version 0.6-0 works perfectly.
devtools::install_url("https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz")
Testing: in R, try require(Rgplk)

Resources