New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install Imagick extension #372

Closed
makbeth opened this Issue Nov 3, 2014 · 20 comments

Comments

Projects
None yet
6 participants
@makbeth

makbeth commented Nov 3, 2014

on php-5.3.28
phpbrew ext install imagick
===> Installing imagick extension...
Log stored at: /home/vagrant/.phpbrew/build//ext/imagick/build.log
Changing directory to /home/vagrant/.phpbrew/build//ext/imagick
===> Phpize...
===> Configuring...
Command failed: ./configure >> /home/vagrant/.phpbrew/build//ext/imagick/build.log 2>&1 returns
in log file (4 last lines):
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.

If i try to install MagickWand or ImageMagick using phpbrew ext install I get this error:
phpbrew ext install imagemagick
Invalid package version: imagemagick @

Maybe I'm doing something wrong? Need help, guys.

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Nov 3, 2014

Member

Hi :) what happens if you provide a specific version number from http://pecl.php.net/package/imagick?

phpbrew ext install imagick <version>
Member

marcioAlmada commented Nov 3, 2014

Hi :) what happens if you provide a specific version number from http://pecl.php.net/package/imagick?

phpbrew ext install imagick <version>
@makbeth

This comment has been minimized.

Show comment
Hide comment
@makbeth

makbeth Nov 3, 2014

The same thing:
phpbrew ext install imagick 2.3.0
===> Installing imagick extension...
Log stored at: /home/vagrant/.phpbrew/build//ext/imagick/build.log
Changing directory to /home/vagrant/.phpbrew/build//ext/imagick
===> Phpize...
===> Configuring...
Command failed: ./configure >> /home/vagrant/.phpbrew/build//ext/imagick/build.log 2>&1 returns

makbeth commented Nov 3, 2014

The same thing:
phpbrew ext install imagick 2.3.0
===> Installing imagick extension...
Log stored at: /home/vagrant/.phpbrew/build//ext/imagick/build.log
Changing directory to /home/vagrant/.phpbrew/build//ext/imagick
===> Phpize...
===> Configuring...
Command failed: ./configure >> /home/vagrant/.phpbrew/build//ext/imagick/build.log 2>&1 returns

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Nov 3, 2014

Member

OK, I'll tag this as bug for now but it's also possible that you have a missing dependency to build the ext. The same commands worked here and ext was installed successfully. Could you share your /home/vagrant/.phpbrew/build//ext/imagick/build.log on a gist so we can have more info?

Member

marcioAlmada commented Nov 3, 2014

OK, I'll tag this as bug for now but it's also possible that you have a missing dependency to build the ext. The same commands worked here and ext was installed successfully. Could you share your /home/vagrant/.phpbrew/build//ext/imagick/build.log on a gist so we can have more info?

@c9s

This comment has been minimized.

Show comment
Hide comment
@c9s

c9s Nov 3, 2014

Member

Hi,

Please run ext show to see the configure options:

phpbrew ext show imagick

And you shall see the result:

                Name: imagick
    Source Directory: /Users/c9s/.phpbrew/build/php-5.5.17/ext/imagick
              Config: /Users/c9s/.phpbrew/build/php-5.5.17/ext/imagick/config.m4
            INI File: /Users/c9s/.phpbrew/php/php-5.5.17/var/db/imagick.ini
           Extension: Core
                Zend: no
              Loaded: no

   Configure Options:

        --with-imagick[=autodetect]      Please provide the prefix of Imagemagick installation

In the above output, you shall see the --with-imagick, you need to use this configure option to specify the path of your MagickWand-config or Wand-config

Member

c9s commented Nov 3, 2014

Hi,

Please run ext show to see the configure options:

phpbrew ext show imagick

And you shall see the result:

                Name: imagick
    Source Directory: /Users/c9s/.phpbrew/build/php-5.5.17/ext/imagick
              Config: /Users/c9s/.phpbrew/build/php-5.5.17/ext/imagick/config.m4
            INI File: /Users/c9s/.phpbrew/php/php-5.5.17/var/db/imagick.ini
           Extension: Core
                Zend: no
              Loaded: no

   Configure Options:

        --with-imagick[=autodetect]      Please provide the prefix of Imagemagick installation

In the above output, you shall see the --with-imagick, you need to use this configure option to specify the path of your MagickWand-config or Wand-config

@c9s

This comment has been minimized.

Show comment
Hide comment
@c9s

c9s Nov 3, 2014

Member

For me, my MagickWand-config is stored at /opt/local/bin/MagickWand-config, therefore I run:

phpbrew --debug ext install imagick 3.1.2 -- --with-imagick=/opt/local
Member

c9s commented Nov 3, 2014

For me, my MagickWand-config is stored at /opt/local/bin/MagickWand-config, therefore I run:

phpbrew --debug ext install imagick 3.1.2 -- --with-imagick=/opt/local
@c9s

This comment has been minimized.

Show comment
Hide comment
@c9s

c9s Nov 3, 2014

Member

By the way, it seems that you didnt use a version, /home/vagrant/.phpbrew/build//ext/imagick/build.log this path is wrong.

Member

c9s commented Nov 3, 2014

By the way, it seems that you didnt use a version, /home/vagrant/.phpbrew/build//ext/imagick/build.log this path is wrong.

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Nov 3, 2014

Member

Yep probably using "system" version. We should abort some commands if $PHPBREW_PHP is not set xD

Member

marcioAlmada commented Nov 3, 2014

Yep probably using "system" version. We should abort some commands if $PHPBREW_PHP is not set xD

@c9s

This comment has been minimized.

Show comment
Hide comment
@c9s

c9s Nov 3, 2014

Member

Please at least install a version and switch to it.

Member

c9s commented Nov 3, 2014

Please at least install a version and switch to it.

@c9s

This comment has been minimized.

Show comment
Hide comment
@c9s

c9s Nov 3, 2014

Member

3.1.2 works for me, please do:

phpbrew ext clean --purge imagick
phpbrew ext install imagick 3.1.2  -- --with-imagick=/opt/local
Member

c9s commented Nov 3, 2014

3.1.2 works for me, please do:

phpbrew ext clean --purge imagick
phpbrew ext install imagick 3.1.2  -- --with-imagick=/opt/local

@c9s c9s added Support and removed Bug labels Nov 3, 2014

@c9s

This comment has been minimized.

Show comment
Hide comment
@c9s

c9s Nov 3, 2014

Member

I've also updated on our Cookbook: https://github.com/phpbrew/phpbrew/wiki/Cookbook

Member

c9s commented Nov 3, 2014

I've also updated on our Cookbook: https://github.com/phpbrew/phpbrew/wiki/Cookbook

@makbeth

This comment has been minimized.

Show comment
Hide comment
@makbeth

makbeth Nov 3, 2014

I've done as you told me:
phpbrew ext clean --purge imagick
phpbrew ext install imagick -- --with-imagick=/opt/local
And now I get such an error:
phpbrew ext install imagick -- --with-imagick=/opt/local
===> Installing imagick extension...
Log stored at: /home/vagrant/.phpbrew/build/php-5.3.28/ext/imagick/build.log
Changing directory to /home/vagrant/.phpbrew/build/php-5.3.28/ext/imagick
===> Phpize...
===> Configuring...
Command failed: ./configure '--with-imagick=/opt/local' --with-php-config=/home/vagrant/.phpbrew/php/php-5.3.28/bin/php-config >> /home/vagrant/.phpbrew/build/php-5.3.28/ext/imagick/build.log 2>&1 returns

That is my build.log file: https://www.dropbox.com/s/b13bjfdkzsu69a4/build.log?dl=0
What concerns MagicWand-config, I haven't found it.
If it is important my linux distribution is Ubuntu 14.10

makbeth commented Nov 3, 2014

I've done as you told me:
phpbrew ext clean --purge imagick
phpbrew ext install imagick -- --with-imagick=/opt/local
And now I get such an error:
phpbrew ext install imagick -- --with-imagick=/opt/local
===> Installing imagick extension...
Log stored at: /home/vagrant/.phpbrew/build/php-5.3.28/ext/imagick/build.log
Changing directory to /home/vagrant/.phpbrew/build/php-5.3.28/ext/imagick
===> Phpize...
===> Configuring...
Command failed: ./configure '--with-imagick=/opt/local' --with-php-config=/home/vagrant/.phpbrew/php/php-5.3.28/bin/php-config >> /home/vagrant/.phpbrew/build/php-5.3.28/ext/imagick/build.log 2>&1 returns

That is my build.log file: https://www.dropbox.com/s/b13bjfdkzsu69a4/build.log?dl=0
What concerns MagicWand-config, I haven't found it.
If it is important my linux distribution is Ubuntu 14.10

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Nov 3, 2014

Member

@makbeth do you have libmagickwand-* packages installed?

sudo apt-get install libmagickwand-dev libmagickcore-dev

And try to install again phpbrew ext install imagick.

Member

marcioAlmada commented Nov 3, 2014

@makbeth do you have libmagickwand-* packages installed?

sudo apt-get install libmagickwand-dev libmagickcore-dev

And try to install again phpbrew ext install imagick.

@makbeth

This comment has been minimized.

Show comment
Hide comment
@makbeth

makbeth Nov 3, 2014

Thanks guys! I didn't know how to install that library. Would you mind posting it in cookbok If it is not difficult, of course.

makbeth commented Nov 3, 2014

Thanks guys! I didn't know how to install that library. Would you mind posting it in cookbok If it is not difficult, of course.

@makbeth makbeth closed this Nov 3, 2014

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada
Member

marcioAlmada commented Nov 3, 2014

@EliasZ

This comment has been minimized.

Show comment
Hide comment
@EliasZ

EliasZ Jul 6, 2015

I am still having this exact issue:

checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.

PHP 5.5.26
Debian 8.1
ImageMagick 6.8.9-9

Have installed libmagickwand-dev and libmagickcore-dev

Any pointers?

EliasZ commented Jul 6, 2015

I am still having this exact issue:

checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.

PHP 5.5.26
Debian 8.1
ImageMagick 6.8.9-9

Have installed libmagickwand-dev and libmagickcore-dev

Any pointers?

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Jul 7, 2015

Member

Have you read the cookbook? If you already followed it and still get the issue, can you post your debug output on a gist? Run phpbrew with the "debug" flag:

phpbrew --debug ext install <extension-name>

Member

marcioAlmada commented Jul 7, 2015

Have you read the cookbook? If you already followed it and still get the issue, can you post your debug output on a gist? Run phpbrew with the "debug" flag:

phpbrew --debug ext install <extension-name>

@EliasZ

This comment has been minimized.

Show comment
Hide comment
@EliasZ

EliasZ Jul 8, 2015

Yes, I have read the cookbook. Managed to install multiple extensions and the installation has been running without any problems. The only recurring issue is the warning in the CLI regarding PHP Startup: Invalid library (maybe not a PHP library) 'hash.so' but I don't think that has anything to do with this issue.

https://gist.github.com/EliasZ/8c005eb6530f90d951ba

EliasZ commented Jul 8, 2015

Yes, I have read the cookbook. Managed to install multiple extensions and the installation has been running without any problems. The only recurring issue is the warning in the CLI regarding PHP Startup: Invalid library (maybe not a PHP library) 'hash.so' but I don't think that has anything to do with this issue.

https://gist.github.com/EliasZ/8c005eb6530f90d951ba

@davidfuhr

This comment has been minimized.

Show comment
Hide comment
@davidfuhr

davidfuhr Nov 16, 2015

Contributor

On Debian Jessie it might be necessary to create two symlinks. I've updated the cookbook accordingly.

Contributor

davidfuhr commented Nov 16, 2015

On Debian Jessie it might be necessary to create two symlinks. I've updated the cookbook accordingly.

@EliasZ

This comment has been minimized.

Show comment
Hide comment
@EliasZ

EliasZ Nov 30, 2015

@davidfuhr Thank you for your effort, latest instructions work for me on Jessie.

EliasZ commented Nov 30, 2015

@davidfuhr Thank you for your effort, latest instructions work for me on Jessie.

@ezekg

This comment has been minimized.

Show comment
Hide comment
@ezekg

ezekg Feb 17, 2016

Thanks, @marcioAlmada. Installing libmagickwand-dev and libmagickcore-dev worked for me.

ezekg commented Feb 17, 2016

Thanks, @marcioAlmada. Installing libmagickwand-dev and libmagickcore-dev worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment