PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - libWand.so.9

Bug #203023 reported by Olexandr Zanichkovsky on 2008-03-17
72
This bug affects 2 people
Affects Status Importance Assigned to Milestone
imagemagick (Ubuntu)
Undecided
Ubuntu Server
Hardy
Undecided
Unassigned
php-imagick (Debian)
Fix Released
Unknown
php-imagick (Ubuntu)
High
Ubuntu Server
Hardy
High
Unassigned

Bug Description

Binary package hint: php5-imagick
Requires: libmagick9

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - libWand.so.9: cannot open shared object file: No such file or directory in Unknown on line 0

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu hardy (development branch)"

Sourse package: php5-imagick
Version: 2.0.1-1

I see this warning every time I run PHP CLI script.

noah (noah1-deactivatedaccount) wrote :

I'm seeing this too.
Currently running Ubuntu Hardy, dist-upgrade'd from Gutsy.

# dpkg -l|grep php
ii libapache2-mod-php5 5.2.4-2ubuntu5 server-side, HTML-embedded scripting languag
ii libphp-jpgraph 1.5.2-11ubuntu3 Object oriented graph library for php5
ii libphp-pclzip 2.6-1 zip archive manager class for PHP
ii php-pear 5.2.4-2ubuntu5 PEAR - PHP Extension and Application Reposit
ii php5 5.2.4-2ubuntu5 server-side, HTML-embedded scripting languag
ii php5-cli 5.2.4-2ubuntu5 command-line interpreter for the php5 script
ii php5-common 5.2.4-2ubuntu5 Common files for packages built from the php
ii php5-curl 5.2.4-2ubuntu5 CURL module for php5
ii php5-dev 5.2.4-2ubuntu5 Files for PHP5 module development
ii php5-gd 5.2.4-2ubuntu5 GD module for php5
ii php5-imagick 2.0.1-1 ImageMagick module for php5
ii php5-memcache 2.2.0-1 memcache extension module for PHP5
ii php5-mhash 5.2.4-2ubuntu5 MHASH module for php5
ii php5-mysql 5.2.4-2ubuntu5 MySQL module for php5

Changed in php-imagick:
status: New → Confirmed
Changed in php-imagick:
assignee: nobody → ozanichkovsky
status: Confirmed → In Progress
description: updated

This is debdiff with libmagick9 package added to dependencies.

Changed in php-imagick:
assignee: ozanichkovsky → nobody
status: In Progress → Fix Committed

Fixed version of php5-imagick can be installed from my PPA: https://launchpad.net/~ozanichkovsky/+archive

noah (noah1-deactivatedaccount) wrote :

I would like to add that the Imagick extension to PHP doesn't work because of this.

Here's a demoscript to illustrate just this.
<?php

for($i = 1; $i < $argc; $i++) {
 $f = $argv[$i];
        try {
                $img = new Imagick($f);

                $img->setImageFormat("jpg");
                $img->setCompression(Imagick::COMPRESSION_JPEG);

                echo "Scaling image $f\n";
                $img->thumbnailImage(1024, 768, TRUE);

                echo "Writing image $f\n";
                $img->setCompressionQuality(80);
                if($img->writeImage("output/". basename($f)) !== FALSE) {
                }
  else
   die("Fuck: writeImage() -> FALSE\n");
        }
        catch (Exception $e) {
                echo "EXCEPTION: Failed to process $f:" . $e->getMessage() ."\n";
        }
}

?>

$ php knark.php source/*.jpg
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - libWand.so.9: cannot open shared object file: No such file or directory in Unknown on line 0

Fatal error: Class 'Imagick' not found in knark.php on line 7

As libWand.so.9 aka libmagick9 is not available from the repositories anymore, Hardy is perfectly useless for some (most?) web hosting companies. Please rebuild php5-imagick to use libWand.so.10 aka libmagick10.

Changed in php-imagick:
assignee: nobody → ubuntu-server
Adagio (fcedillo) wrote :

Hello,

Once we have added deb http://ppa.launchpad.net/ozanichkovsky/ubuntu hardy main Update Manager shows:

php5-imagick
ImageMagick modeule for php5 (Size: 82KB)

But this description is inside a gray frame (checkbox is disabled) and classified in category "Other Updates". In that way i can't use the debdiff with libmagick9 package added to dependencies.

Best Regards.

Eric Kerby (erickerby) wrote :

I'd like to add another vote for php5-imagick to be rebuild for libmagick10. Adding a dependency for libmagick9 is not going to help when libmagick9 is not in the hardy repos!

Thanks.

ligaard (kasperligaard) wrote :

I am seeing this too: Hoping for it to be resolved soon via 'apt-get upgrade' :-)

Me too...

A work around is to install the Gutsy libjasper and libmagic9:

http://archive.ubuntu.com/ubuntu/pool/main/j/jasper/
From there I installed libjasper-1.701-1_1.701.0-2_i386.deb

http://archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/
From there I installed libmagick9_6.2.4.5-0.6_i386.deb

Mike O'Connell (wundbread) wrote :

As a temporary fix you can simply symlink to libWand.so.10 and libMagick.so.10, nothing dramatic changed between imagemagick 9 and 10.

sudo ln -s libWand.so.10 libWand.so.9
sudo ln -s libMagick.so.10 libMagick.so.9

komuta (komuta) wrote :

The bug status says "Fix Committed". Is there a patch working with libmagick10 coming in the repositories ?

Chuck Short (zulcss) on 2008-05-09
Changed in php-imagick:
status: Fix Committed → Confirmed
Faris Chebib (octaflop) wrote :

I think I have a more robust fix. I found it on the forums:
http://ubuntuforums.org/showthread.php?t=573878&page=2#12

Faris Chebib (octaflop) on 2008-05-15
Changed in imagemagick:
assignee: nobody → ubuntu-server
Steven Wagner (stevenwagner) wrote :

I really hope this gets fixed soon, because even though I have php5-imagick working with that .deb file listed above, my apt is broken. see below:

steven@monster:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  php5-imagick: Depends: libmagick9 but it is not installable
E: Unmet dependencies. Try using -f.

a simpler solution is to create two symbolic links

ln -s /usr/lib/libMagick.so.10 /usr/lib/libMagick.so.9
ln -s /usr/lib/libWand.so.10 /usr/lib/libWand.so.9

then:

sudo apache2ctl restart

Works for me :)

Steven Wagner (stevenwagner) wrote :

Yah, creating the symbolic links works perfect. Thanks a lot! This has been bugging me for months with a broken apt-get package db.

gondim (gondim) wrote :

This bug has a certain age. It has been forgotten or have any corrections soon?
Certainly the symbolic links work, but we expect a package of correction. :)

enyc (enyc) wrote :

Even from a fresh-install 8.04.1 amd64 server ubuntu, this is still happening
  causing trouble for php5-cli in my case!

sudo ln -s libMagick.so.10 /usr/lib/libMagick.so.9
sudo ln -s libWand.so.10 /usr/lib/libWand.so.9
-- does workaround the issue ok.

--But I certainly agree this really needs rebuild of php5-imagick
  package (in hardy-updates) so that the correct library version is compiled
  against!

Would this cause trouble for anything that links to
  /usr/lib/php5/20060613/imagick.so already?

Nelson A. de Oliveira (naoliv) wrote :

php-imagick needs to be rebuilt, not a problem with imagemagick.

Changed in imagemagick:
status: New → Invalid
Changed in php-imagick:
status: Unknown → Fix Released
gondim (gondim) wrote :

This is an ugly error and simple to resolve. I do not know because nobody has rebuild the package. : (

> This is an ugly error and simple to resolve. I do not know because
> nobody has rebuild the package. : (

I have previously created -proposed packages but these were for universe
   rather than main ... Im not sure where to start to do that.. Maybe
   somebody can point me at the right procedure for creating a proposed
   package for hardy-updates to fix this?

--enyc

Ante Karamatić (ivoks) on 2008-07-29
Changed in php-imagick:
importance: Undecided → High
Ante Karamatić (ivoks) wrote :

This patch solves the issue in the same manner as Debian did.

Changed in php-imagick:
importance: Undecided → High
status: New → Confirmed
Ante Karamatić (ivoks) wrote :

Patch was tested and resulting binaries work as they should. No regressions.

Changed in imagemagick:
status: New → Invalid
Luca Falavigna (dktrkranz) wrote :

ACK from motu-sru.

Martin Pitt (pitti) wrote :

Ante, please reupload with fixed changelog: "Closes: LP#203023" -> "LP: #203023". (Otherwise the tracking scripts don't recognize it and it is lost)

Ante Karamatić (ivoks) wrote :

Done. I noticed that my self, right after I uploaded it. Sorry.

Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in php-imagick:
status: Confirmed → Fix Committed
gondim (gondim) wrote :

Tested! Packet php5-imagick version 2.0.1-1ubuntu0.1 from proposed repository work perfectly. :)

Good work!! :D

zeugmatis (mark-symonds) wrote :

Just to confirm: 8.04, a stable release (supposedly), was released with this bug and nothing was done for three months.

Is this correct?

gondim (gondim) wrote :

Zeugmatis, yes. This bug was released with Hardy stable version (8.04 LTS).

Luca Falavigna (dktrkranz) wrote :

Fixed in Intrepid.

Changed in php-imagick:
status: Confirmed → Fix Released
Luca Falavigna (dktrkranz) wrote :

Version in hardy-proposed works correctly.

LimCore (limcore) wrote :

Intrepid version seems to work fine for me as well.

Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in php-imagick:
status: Fix Committed → Fix Released
wr19026 (wridderikhoff) wrote :

Looks like the latest updates to the php5 packages broke it again. The symlink solution doesn't work and I have the latest version of the package installed.

> Looks like the latest updates to the php5 packages broke it again. The
> symlink solution doesn't work and I have the latest version of the
> package installed.

What release / architechure are you using?
   (cat /etc/lsb-release);(uname -a)
What version of php5-imagick has just got installed?
   (dpkg -l php5-imagick)
What error do you now get exactly?

I have been quite successful in installing php5-imagick on ubuntu
   Jaunty9.04 i386, without trouble.... (just tried that)...

--Simon

wr19026 (wridderikhoff) wrote :

Thanks for your quick response, here are the 3 pieces of information you requested.

Thanks in advance for your feedback.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.2"
Linux 123.example.com 2.6.24-23-generic #1 SMP Wed Apr 1 21:47:28 UTC 2009 i686 GNU/Linux

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Naam Versie Omschrijving
+++-==============-==============-============================================
ii php5-imagick 2.0.1-1 ImageMagick module for php5

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/2006061
3+lfs/imagick.so' - libWand.so.9: cannot open shared object file: No such file o
r directory in Unknown on line 0

> Thanks for your quick response, here are the 3 pieces of information you
> requested.
> DISTRIB_DESCRIPTION="Ubuntu 8.04.2" [...] i686 GNU/Linux
> ||/ Naam Versie Omschrijving
> +++-==============-==============-============================================
> ii php5-imagick 2.0.1-1 ImageMagick module for php5
> PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/2006061
> 3+lfs/imagick.so' - libWand.so.9: cannot open shared object file: No such file o

It would seem you have the 'hardy' version of the php5-imagick package,
   2.0.1-1 which has the bug. (It was linked with libWand.so.9 version).

The 'hardy-updates' version of php5-imagick (** 2.0.1-1ubuntu0.1 **)
   depends upon 'libmagick10' and does not appear to have this problem.

I.e. it would appear you have the old un-fixed version of the package!!
See:-
   http://packages.ubuntu.com/php5-imagick

If you look in your /etc/apt/sources.list file you may be missing
   hardy-updates...

My Hardy8.04 machine has this in /etc/apt/sources/list:-
------------------------------------------------------------------------
deb http://gb.archive.ubuntu.com/ubuntu/ hardy main universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy main universe
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main universe
deb http://security.ubuntu.com/ubuntu hardy-security main universe
deb-src http://security.ubuntu.com/ubuntu hardy-security main universe
------------------------------------------------------------------------

Good luck!

--Simon

Colin Dean (colindean) wrote :

I hit this bug today. I have 2.0.1-1 of php5-imagick installed despite having hardy-updates in my sources.list. Linking /usr/lib/libWand.so.9 to /usr/lib/libWand.so.10 seems to work sufficiently for me.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.