Can't locate Graphics/Magick.pm in @INC

Bug #1159088 reported by Darren Conway
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
graphicsmagick (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi

I have tried to install GraphicsMagick on a server and it doesn't work.

I did server installation on an older 32bit PC.

The version of Ubuntu is:

$ apt-cache policy graphicsmagick
graphicsmagick:
  Installed: 1.3.12-1.1build1
  Candidate: 1.3.12-1.1build1
  Version table:
 *** 1.3.12-1.1build1 0
        500 http://nz.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
        100 /var/lib/dpkg/status

A search for the package found:
$ sudo find / -name Magick.pm
[sudo] password for darren:
darren@alpha:~$ dpkg --get-selections | grep magick
graphicsmagick install
libgraphicsmagick3 install

I tried to compile check the following test script:
#!/usr/bin/perl
# ===========================================================
use warnings;
use strict;
use Graphics::Magick;

my $imageFile = "/var/images/trackcam1/lastsnap.jpg";
my $logoFile = '/home/darren/logo1.jpg';

  my $logo=Graphics::Magick->New();
  $logo->Read($logoFile);

  my $image=Graphics::Magick->New();
  $image->Read($imageFile);
  my $webImage = $image->Composite(image=>$logo, gravity=>'NorthWest');
  $webImage->Set(quality=>100);
  $webImage->Write("jpg:/var/images/trackcam1.jpg");

  undef $imageFile;
  undef $logoFile;
  undef $webImage;

exit 1;

$ perl -c compositeTest.pl
Can't locate Graphics/Magick.pm in @INC (@INC contains: /etc/perl /usr/local/lib
/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at compositeTest.pl line 5.
BEGIN failed--compilation aborted at compositeTest.pl line 5.

A search for Magick.pm ($ sudo find / -name Magick.pm ) did not produce the results.

I have seen this bug on 2 servers. On the first I was building/developing the software.
I came across this bug and couldn't find a solution on Google or the Ubuntu forums.
I thought I might have mangled Perl.

I then built a 2nd server starting with a blank HD.
Prior to installing the Magick package, I did apt-get update then upgrade.
I have exactly the same error message on the fresh server installation.
I haven't done anything that might mangle Perl.

In short:
Installing the GraphicsMagick package was not successful.
I expected to be able to interface Perl scripts with the GraphicsMagick API.
I got exactly the same error message on two nearly identical server installations.

Revision history for this message
Darren Conway (darren-conway) wrote :

For clarification, the GraphicsMagick package installation appeared to be successful.
The first indication of a problem was when I checked the test script.

Revision history for this message
Darren Conway (darren-conway) wrote :

I found the problem.

The line:
  my $webImage = $image->Composite(image=>$logo, gravity=>'NorthWest');
has a syntax error.

When the line is changed to the following:
  my $webImage ->Composite(image=>$logo, gravity=>'NorthWest');

It worked.

So this is not a bug with Graphics Magick and should be disregarded.

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

Other bug subscribers

Remote bug watches

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