Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#27469 closed defect (invalid)

ImageMagick @6.6.5-0_0+q16 - Can't locate Image/Magick.pm in @INC

Reported by: talkto@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: ImageMagick

Description (last modified by jmroot (Joshua Root))

Hey Guys,

I upgraded my system to Snow Leopard and installed MacPorts and a few modules like DBI; Cwd; CGI qw(:all); LWP::Simple qw(get); and Image::Magick; All works like a dream but I cannot seem to get Image Magick to load. I made a testscript and got the following error returned:

Can't locate Image/Magick.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0) at /Library/WebServer/CGI-Executables/parrotdev/test.pl line 7. 

All other modules are loading just fine.

The following ports are currently installed: 
apache2 @2.2.17_0+preforkmpm (active)
  apr @1.4.2_1 (active)
  apr-util @1.3.9_2 (active)
  autoconf @2.68_0 (active)
  automake @1.11.1_0 (active)
  bzip2 @1.0.6_0 (active)
  db46 @4.6.21_6 (active)
  expat @2.0.1_1 (active)
  fontconfig @2.8.0_0 (active)
  freetype @2.4.3_0 (active)
  gd2 @2.0.35_8 (active)
  gdbm @1.8.3_2 (active)
  gettext @0.18.1.1_2 (active)
  ghostscript @9.00_4 (active)
  gperf @3.0.4_0 (active)
  help2man @1.38.2_0 (active)
  ImageMagick @6.6.5-0_0+q16 (active)
  jpeg @8b_0 (active)
  lcms @1.19_2 (active)
  libiconv @1.13.1_0 (active)
  libidn @1.19_0 (active)
  libpaper @1.1.24_0 (active)
  libpng @1.2.44_0 (active)
  libtool @2.4_0 (active)
  libxml2 @2.7.8_0 (active)
  m4 @1.4.15_0 (active)
  mod_perl2 @2.0.4_0 (active)
  mysql5 @5.1.52_0 (active)
  mysql5-server @5.1.52_0 (active)
  ncurses @5.7_1 (active)
  ncursesw @5.7_1 (active)
  openssl @1.0.0a_1 (active)
  p5-compress-raw-bzip2 @2.031_0 (active)
  p5-compress-raw-zlib @2.027_0 (active)
  p5-crypt-ssleay @0.57_1 (active)
  p5-dbd-mysql @4.014_0+mysql5 (active)
  p5-dbi @1.611_0 (active)
  p5-html-parser @3.65_0 (active)
  p5-html-tagset @3.20_0 (active)
  p5-io-compress @2.027_0 (active)
  p5-libwww-perl @5.837_0 (active)
  p5-locale-gettext @1.05_3 (active)
  p5-mail-sendmail @0.79_0 (active)
  p5-perlmagick @6.59_0 (active)
  p5-test-simple @0.94_1 (active)
  p5-uri @1.54_0 (active)
  p7zip @9.13_1 (active)
  pcre @8.10_0 (active)
  perl5.8 @5.8.9_3 (active)
  pkgconfig @0.25_1 (active)
  python26 @2.6.6_0+no_tkinter (active)
  readline @6.1.002_0 (active)
  sqlite3 @3.7.3_0 (active)
  tiff @3.9.4_0 (active)
  xorg-bigreqsproto @1.1.1_0 (active)
  xorg-inputproto @2.0.1_0 (active)
  xorg-kbproto @1.0.5_0 (active)
  xorg-libice @1.0.7_0 (active)
  xorg-libpthread-stubs @0.3_0 (active)
  xorg-libsm @1.2.0_0 (active)
  xorg-libX11 @1.3.6_1 (active)
  xorg-libXau @1.0.6_0 (active)
  xorg-libxcb @1.7_0+python26 (active)
  xorg-libXdmcp @1.1.0_0 (active)
  xorg-libXext @1.2.0_0 (active)
  xorg-libXt @1.0.9_0 (active)
  xorg-util-macros @1.11.0_0 (active)
  xorg-xcb-proto @1.6_0+python26 (active)
  xorg-xcmiscproto @1.2.1_0 (active)
  xorg-xextproto @7.1.2_0 (active)
  xorg-xf86bigfontproto @1.2.0_0 (active)
  xorg-xproto @7.0.19_0 (active)
  xorg-xtrans @1.2.6_0 (active)
  xpm @3.5.9_0 (active)
  zlib @1.2.5_0 (active)

Cheers,

Ton

Anyone?

Cheers,

Ton

Change History (8)

comment:1 Changed 13 years ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…

Please remember to preview and use WikiFormatting, and to cc the maintainer.

comment:2 Changed 13 years ago by jmroot (Joshua Root)

You probably just want to use the perl variant?

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Correct, install ImageMagick with the +perl variant.

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Also, your Perl @INC seems to list only system directories, which means you're using the system's perl; you should use MacPorts perl instead, to get access to the perl modules you installed with MacPorts.

comment:5 in reply to:  4 Changed 13 years ago by talkto@…

Hey Ryan, how can I see if I am using the system Perl instead of the Macports Perl? I think I installed Perl with MacPorts. This is how I installed Perl and the modules:

sudo port -v selfupdate
sudo port install mysql5 +server
sudo port install perl5.8
sudo port install mod_perl2
sudo port install p5-libwww-perl
sudo port install p5-dbd-mysql
sudo port install p5-dbi
sudo port install ImageMagick
sudo port install p5-perlmagick
sudo port install p5-html-parser
sudo port install p5-mail-sendmail

Cheers,

Ton

comment:6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

How are you running your perl script? If you're running it by typing "/usr/bin/perl script.pl", or if you're running it with "./script.pl" and its first line is "#!/usr/bin/perl -w" or similar, then you're using Mac OS X's perl. Instead, run it by typing "/opt/local/bin/perl script.pl", or set its first line to "#!/opt/local/bin/perl -w" or similar. Or ensure /opt/local/bin is in your PATH and then run it with "perl script.pl" or by setting its first line to "#!/usr/bin/env perl -w" or similar.

comment:7 in reply to:  6 Changed 13 years ago by talkto@…

Hey Ryan,

I start my scripts with:

#!/opt/local/bin/perl -w

use DBI;
use Cwd;
use CGI qw(:all);
use LWP::Simple qw(get);
use Net::SMTP;
use Time::HiRes qw(gettimeofday);

most other modules work fine like Apache, DBI and MySql

Cheers,

Ton

comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Remember to use WikiFormatting, please, so your posts are legible.

If you start your scripts with "#!/opt/local/bin/perl" and run them as ./script.pl then you are using MacPorts perl. If the @INC path does not include the MacPorts perl paths, I don't know why; I am not really a perl programmer.

Note: See TracTickets for help on using tickets.