Richard Lee wrote:
Chas. Owens wrote:
On Apr 16, 2008, at 13:33, Monty wrote:
Hope this is the right forum for this.
I recently downloaded Curses-1.23.tar from CPAN for installation on to
my Solaris 8 system. I installed the module in the same area as all
my other perl modules: /usr/local/lib/perl5/5.8.5, but I noticed
there's also a directory named /usr/local/lib/perl5/site_perl.
Under the directory 5.8.5, I untarred the file and it created a
directory named Curse-1.23 and put everything under it. I moved the
Curses.pm module up to the 5.8.5 directory and renamed the Curses-1.23
directory to Curses, so I can "use Curses" in my scripts.
Is this the correct way to install this module? My scripts can't seem
to find it.
snip
No, this is not the proper way to install a Perl module. You have
four common routes to installing a module:
1. become root and use CPAN
2. become root and install manually
3. use CPAN as a normal user and set PERL5_LIB (or use the lib pragma)
4. install manually as a normal user and set PERL5_LIB (or use the
lib pragma)
1. become root and use CPAN:
su -
perl -MCPAN -e "install Curses"
#answer all of the questions, the defaults tend to be correct
2. become root and install manually
su -
gzip -dc module-version.tar.gz | tar xvf
cd module-version
perl Makefile.pl
make
make test
make install
#stop if at any step where you get errors
3. use CPAN as a normal user and set PERL5_LIB (or use the lib pragma)
#like 1., but you should set PREFIX=/some/directory/you/countrol
perl -MCPAN -e "install Curses"
echo "export PERL5_LIB=/some/directory/you/countrol" >> .profile
4. install manually as a normal user and set PERL5_LIB (or use the
lib pragma)
gzip -dc module-version.tar.gz | tar xvf
cd module-version
perl Makefile.pl PREFIX=/some/directory/you/countrol
make
make test
make install
#stop if at any step where you get errors
echo "export PERL5_LIB=/some/directory/you/countrol" >> .profile
I am planning to use 3 or 4.. as I am not root user on this machine.
Problem is, this is solaris and there is only gcc available. What is
the method to say use gcc ?
Also, for 3), am I suppose to export PERL5_LIB before doing the perl
-MCPAN........ ?
which means solaris system was built by cc but after gone in production
it was removed.
I do see gcc compiler.. that's why I was wondering if I can specify the
compiler while doing module installation..
keep googl'ing for solutions..
[EMAIL PROTECTED] ~/.cpan/build/IO-Tty-1.07> perl Makefile.PL
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
ERROR: cannot run the configured compiler 'cc'
(see conf/compilerok.log). Suggestions:
1) The complier 'cc' is not in your PATH. Add it
to the PATH and try again. OR
2) The compiler isn't installed on your system. Install it. OR
3) You only have a different compiler installed (e.g. 'gcc').
Either fix the compiler config in the perl Config.pm
or install a perl that was built with the right compiler
(you could build perl yourself with the available compiler).
Note: this is a system-administration issue, please ask your local
admin for help. Thank you.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/