homepage Welcome to WebmasterWorld Guest from 54.237.95.6
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Image Magic
parrot




msg:4230789
 11:57 pm on Nov 15, 2010 (gmt 0)

Hey Guys, I upgraded my system to Snow Leopard and installe 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.

Anyone?

Cheers,

Ton

 

janharders




msg:4230938
 9:59 am on Nov 16, 2010 (gmt 0)

How did you install Image::Magick? You'll need the libraries aswell as the perl wrappers.
I don't have any clue about mac software packaging, but look for perlmagick, which they usually ship it as.

parrot




msg:4230953
 11:21 am on Nov 16, 2010 (gmt 0)

Hey Jan, This is what I have installed so far. All other packages work 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)
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-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)
zlib @1.2.5_0 (active)

Cheers,

Ton

janharders




msg:4230967
 12:18 pm on Nov 16, 2010 (gmt 0)

Again, I'm no expert, but here's what I figured out:
There was/is a package p5-perlmagick, but it doesn't compile on Snow Leopard and is deprecated.
The suggested way is to compile imagemagick with perlmagick in one step.
sudo port -nu uninstall imagemagick
sudo port clean imagemagick
sudo port install imagemagick +perl

parrot




msg:4230979
 1:26 pm on Nov 16, 2010 (gmt 0)

Jan, uninstalled and reinstalled with your example... still no Image magick loaded;-( Getting the same error.

Ton

janharders




msg:4231026
 3:58 pm on Nov 16, 2010 (gmt 0)

Have you tried installing p5-perlmagick or querying for any other perlmagick-packages? maybe the sites I saw weren't up to date.
Other than that, I'm out of ideas, sorry.

phranque




msg:4231252
 1:56 am on Nov 17, 2010 (gmt 0)

just looked at my dev server - i have both p5-PerlMagick-6.6.1.5nb4 and ImageMagick-6.6.1.5nb1 installed.

parrot




msg:4231706
 12:12 am on Nov 18, 2010 (gmt 0)

bad news here, I have tried both but no result. I am stuck here, I am supposed to deliver a big project in a few weeks and need to be able to resize incomming pictures. Any alternatives out there?

Ton

phranque




msg:4231725
 1:24 am on Nov 18, 2010 (gmt 0)

so did you actually look in all the directories listed in the @INC array and verify that Image/Magick.pm exists?
have you found Image/Magick.pm anywhere?
when you find the location you could try adding that with a use lib [perldoc.perl.org] statement.

parrot




msg:4231884
 11:01 am on Nov 18, 2010 (gmt 0)

Hey Phranque, Here is what I found on locations:


/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/work/PerlMagick-6.59/Magick.pm

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/work/PerlMagick-6.59/blib/lib/Image/Magick.pm

/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Image/Magick.pm

/opt/local/var/macports/software/p5-perlmagick/6.59_0/opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Image/Magick.pm

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/work/destroot/opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Image/Magick.pm

Cheers,

Ton

janharders




msg:4231908
 11:51 am on Nov 18, 2010 (gmt 0)

/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Image/Magick.pm
looks best imho, try
use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/"

before
use Image::Magick;
parrot




msg:4231931
 1:35 pm on Nov 18, 2010 (gmt 0)

Tried to use the "use lib" module but still cant make it to work. Btw, does using the "use lib" module store any data when you use it?
The documentation on [perldoc.perl.org...] looks like it does?

Ton

phranque




msg:4231934
 1:40 pm on Nov 18, 2010 (gmt 0)

you got the same error as before?

"use lib" merely appends to the @INC array for the duration of the process.

janharders




msg:4231936
 1:58 pm on Nov 18, 2010 (gmt 0)

Has the errormessage changed to include "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/" in @INC?

parrot




msg:4231941
 2:03 pm on Nov 18, 2010 (gmt 0)

Hi guys, I am sorry I must sound like a noob to you;-(
Here is what I get:

Script header:
#!/opt/local/bin/perl -w

use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level";
use Image::Magick;


Original error massage WITHOUT (use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level";)
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)

New error message: WITH (use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level";)
Can't load '/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level//auto/Image/Magick/Magick.bundle' for module Image::Magick: dlopen(/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/auto/Image/Magick/Magick.bundle, 1): Symbol not found: _PL_curpad
Referenced from: /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level//auto/Image/Magick/Magick.bundle
Expected in: dynamic lookup
at /Library/WebServer/CGI-Executables/platinumsite/test.pl line 4

Ton

janharders




msg:4231975
 3:39 pm on Nov 18, 2010 (gmt 0)

Ok, yeah, that's an installation problem. Unless phranque saves the day here, you might want to look for mailing list or support board for macports.

parrot




msg:4231993
 3:52 pm on Nov 18, 2010 (gmt 0)

Thanks Jan, as always you are a great help!

Ton

chorny




msg:4234679
 9:53 pm on Nov 24, 2010 (gmt 0)

Try installing Image::Magick with cpan client.

parrot




msg:4234706
 11:06 pm on Nov 24, 2010 (gmt 0)

Hey Chorny, doesn't that mess up my ports structure and will I be able to remove cpan if it doesn't work?

Ton

chorny




msg:4234911
 2:33 pm on Nov 25, 2010 (gmt 0)

Yes, you will not able to remove it later if you install it directly from CPAN.

You can also try GD library - it also has resize abilities.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved