Thread

Posted on Wed Mar 29 21:23:28 2006 by eoinmullan
Problem Installing Imager
Hi, I've installed Imager in the following way: perl Makefile.pl make make install I've added the directory to the environment variable PERL5LIB so it can be found but when I try to use Imager in a perl script I get an error message saying can't locate Imager/Color.pm Any ideas what I should do to fix this? Many Thanks, Eoin
Direct Responses: 2073 | Write a response
Posted on Thu Mar 30 01:31:46 2006 by tonyc in response to 2070
Re: Problem Installing Imager
Normally if you install that way (with no PREFIX) you'll install into perl's site directory, which is already in @INC.
If you can provide a little more detail, it would be helpful:
* how did you get it to install in another directory? did you use the PREFIX parameter?
* do you know where Imager/Color.pm ended up after? find or locate might be useful to find out.
* which platform are you on and which version of perl?
Direct Responses: 2078 | Write a response
Posted on Thu Mar 30 14:24:21 2006 by eoinmullan in response to 2073
Re: Problem Installing Imager
Im using a unix server. I don't have administrator privledges and as I will be the only one using the module I installed it in a directory called perl_modules which I created in my home directory. I unpacked it then ran the commands above. I have looked for the Color.pm module and found it in ~/perl_modules/Imager/lib/Imager and ~/perl_modules/Imager/blib/lib/Imager. I think the problem came from when I ran "make install" (I didn't use the PREFIX parameter, I don't know what that is). It tried to create the directory /usr/local/lib/perl and was refused permission: "Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112". I want some way to install the module so that it is contained entirely under my home directory. (Also if you could tell me how to take a newline in this forum I could make my post tidier). I'm using perl v5.8.7. Many Thanks, Eoin
Direct Responses: 2080 | Write a response
Posted on Thu Mar 30 15:05:15 2006 by tonyc in response to 2078
Re: Problem Installing Imager
Yeah, I'm not fond of the way line-breaks work on here either - you need to put <br> in your text to get a line-break.

The simplest way to install under some specific directory is to supply a PREFIX parameter:
perl Makefile.PL PREFIX=~/lib make make test make install

With Imager, since it has XS components, the files will actually be installed in a directory under that, for me it's /home/tony/lib/i386-linux-thread-multi/, so you'll need to set PERL5LIB to match.
Direct Responses: 2090 | Write a response
Posted on Fri Mar 31 11:52:45 2006 by eoinmullan in response to 2080
Re: Problem Installing Imager
Excellent, it's installed correctly now. Thanks for the help.

I have one concern, when I ran Makefile.PL i got the message "gif: includes not found - libraries not found". I'm worried this will mean I will not be able to create animated .gif images. If so I may be incontact again to see if you can help me out.

Thanks again for your help for now.

Eoin
Direct Responses: 2093 | Write a response
Posted on Sat Apr 1 02:09:09 2006 by tonyc in response to 2090
Re: Problem Installing Imager
You'll need to install giflib or libungif if you want animated GIFs from Imager.

You can get source for either from:

http://sourceforge.net/project/showfiles.php?group_id=102202

You'll probably want to supply a --prefix option to configure to install somewhere under your home directory.

Once you have giflib installed you'll need to rebuild Imager telling where to find it:
perl Makefile.PL --incdir /path/to/prefix/include --libdir /path/to/prefix/lib PREFIX=/where/to/ins +tall make make test make install
Direct Responses: 2094 | Write a response
Posted on Sat Apr 1 14:49:02 2006 by eoinmullan in response to 2093
Re: Problem Installing Imager
That worked perfectly, automatically generated personalised .gifs for everyone

It's very possible I made a mistake but I couldn't provide the location of the include and lib files to Imager's Makefile.pl as arguments using --incdir and --libdir. Instead I had to set the environment variables $IM_INCPATH and $IM_LIBPATH. In any case it's all installed correctly now.

Many Thanks,

Eoin
Write a response