This question about Using an extension: Answered

"Can't locate Imagepath in @INC" error

Hi - I'm trying to run ImageMagick on my site. I think ImageMagick is correctly installed and enabled in Foswiki. However, now I'm getting the "Can't locate Imagepath in @INC" error. What I have in my Foswiki topic reads:
%IMAGE{"\\forbin\CADmgt\MKACADD_Hybrid\CADWiki\Graphics\AutoCADSeedDialog.jpg" type="frame" align="center" caption="Seeds" }%

"Forbin" is on our network. Regular HTML image commands can display images from this location. Can you suggest what else I might be missing? I'll be the absolute first to admit I'm just starting to learn what I'm doing, so I'm fumbling around without really knowing much about linux, Foswiki, Apache, etc., much less how to install and use plugins. Please cut me some slack for asking newbie questions.

Thanks, in advance, for any additional suggestions you can offer.

-- ErikHuemer - 20 Mar 2012

Did you install the perlmagick package?

-- PatrickPirtle - 13 Apr 2012

Thanks for your response. I'm sorry, I don't actually know or remember (it has been so long since I fumbled my way through getting Foswiki installed). I don't think so. Is this required for the ImageMagick addon? How would I verify if it is installed?


Unfortunately this varies by operating system and distribution.There are two packages, the Imageagick program itself, and the perl bindings, perlmagick.On some systems, it's enough to install ImageMagick, on others perlmagick needs to be installed separately to get the perl bindings. And not to confuse things further, but on some systems it's better to use Graphics::Magick.

The "path" part of the error is actually a token that is substituted into the error message to hide the details of your installation from users. It's not that it cannot find "Imagepath", but it can't find the Library file Image/Magic,.pm.

What operating system are you using? ( Linux, Windows, ???).If Linux, which distribution, Debian, RedHat, Centos, etc.And if Windows, which version of perl? Strawberry, ActiveState, Cygwin, or some other perl?From that maybe we can help figure out what you are missing.

-- GeorgeClark - 14 Apr 2012

Thanks for your response. I'm such a newb, I was afraid the question wouldn't get any attention.

Here's my OS Info:

OS:Linux "2.6.34-12-default i686"

System:openSUSE 11.3 (i586)

Until I hear from you, I'll look further into trying to find info on perlmagick. Thanks, again.

-- PatrickPirtle - 13 Apr 2012

I have not done anything with SuSE in many years, however a quick google search found the following:

http://rpm.pbone.net/index.php3/stat/4/idpl/14282581/dir/opensuse_11.x/com/perl-PerlMagick-6.6.1.0-3.8.i586.rpm.html

-- GeorgeClark - 17 Apr 2012

OK, I figured out how to download and install the perl-PerlMagick-6.6.1.0-4.5.1.i586.rpm package. Unfortunately, I still get the "@INC" error message. I welcome any additional suggestions.

-- PatrickPirtle - 24 May 2012

Does the path in bin/LocalLib.cfg point to the place where it can find perl magick?

-- ArthurClemens - 24 May 2012

Thanks for your reply. I found the " http://foswiki.org/Support/HowFoswikiFindsPerlLibraries" topic, and it looks that you're refering to the "@localPerlLibPath" line that I should try editing? So, should that be the path to the ImageMagick plugin, or the path to where the PerlMagick package got installed?

I suspect it's the latter--how do I find where the PerlMagick package got installed?

Thanks, again, for your help.

-- PatrickPirtle - 24 May 2012

It should point to the Perl module of PerlMagick, and actually to the root of the perl distribution.

I have this set:
@localPerlLibPath = ( '/opt/local/lib/perl5/vendor_perl/5.12.4', '/opt/local/lib/perl5/site_perl/5.12.4/darwin-multi-2level', '/opt/local/lib/perl5/site_perl/5.12.4');

I guess you need a file search to find it.

-- ArthurClemens - 24 May 2012

I found the perl stuff and edited my LocalLib.cfg file to contain:

@localPerlLibPath = ( '/usr/lib/perl5/vendor_perl/5.12.1', '/usr/lib/perl5/site_perl/5.12.1' );

But, when I open the Foswiki page, I still get a message that it:

"Can't locate Graphicspath in @INC (@INC contains: path . path-linux-thread-multi path path-linux-thread-multi path path-linux-thread-multi path path path path path-linux-thread-multi path path)"

Could I have something screwed up so that it's not adding the paths to @INC? Also, I couldn't find anything similar to the 2nd path you had included in yours. Thanks, again.

-- PatrickPirtle - 25 May 2012

That looks familiar. Remove GraphicsMagick, it conflicts with ImageMagick.

-- ArthurClemens - 25 May 2012

Well! Your last comment got me as close as I've been. The ImageMagick extension now seems to work with images that are stored IN the "Sandbox/imagePluginTest" folder. Now, I need to try to find out how to get it to look at one of our network drives to find them. Thanks, VERY much, for your help and patience!

-- PatrickPirtle - 29 May 2012
 

QuestionForm edit

Subject Using an extension
Extension ImagePlugin
Version Foswiki 1.1.2
Status Answered
Related Topics
Topic revision: r15 - 29 May 2012, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy