How to install CPAN?


Forum: Other Help Topics
Topic: How to install CPAN?
started by: hillin-fantasia

Posted by hillin-fantasia on Feb. 03 2006,18:17
Hi.
I installing DSL on my laptop. Now I would like to programing for Perl.

I try to install some CPAN modules but I get message (when I typing: perl -MCPAN -e shell):

Can't locate CPAN.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.0 /usr/local/share/perl /usr/..... ).
BEGIN failed--compilation abort.

How to correct that problem?

Posted by clacker on Feb. 03 2006,19:04
You have two choices: either update perl using apt-get or load the gtk2-0705.dsl package from the < GTK2 section of the repository > which contains what you need to use CPAN.

I think loading that gtk2-0705.dsl package is the easier of the two.

then run sudo perl -MCPAN -e shell from a terminal.

Posted by hillin-fantasia on Feb. 03 2006,20:21
Erm... I'm now downloading that file. May I install that some way?
Posted by clacker on Feb. 03 2006,20:45
yes, open the emelfm file browser, select that file you are downloading, and press the "MyDSL" button to load it.  Then you should be able to use CPAN.
Posted by hillin-fantasia on Feb. 04 2006,08:16
THX, but how I can install make, gcc and g++? :D I'm very n00b :D
Posted by clacker on Feb. 04 2006,13:26
Download gcc1.dsl from < the system section of the repository. >  then open the emelfm program, select that file and press the mydsl to load gcc, g++, and make.

Depending what you are trying to do, you might also need to get the dsl-dpkg.dsl package so that you can get libraries and headers.  After you install dsl-dpkg.dsl (same as above), open an xshell and type:

sudo apt-get update
apt-get install libncurses5-dev
apt-get install libreadline4-dev
exit

Posted by hillin-fantasia on Feb. 04 2006,14:06
Yeah, now I have gcc, g++ and make, but when I typing (on cpan shell) install Curses I get about bilion messages like:

....
function 'set_field_userptr' NOT found
....
variable 'LINES' NOT found
....
typedef 'attr_t' NOT found
....
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHEARDS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -02 -DVERSION=\"1.13\" -fPIC
blah balh...
/bin/sh: line 1: cc: command not found
make: *** [Curses.o] error 127

What now?

Posted by clacker on Feb. 05 2006,00:41
did you run the apt-get command to install libncurses5-dev like the previous post said?  libncurses is curses library, which your CURSES may need to compile.

It looks like you are not finding the cc comand.  gcc is the cc compiler, so you can create a symbolic link between the one and the other.  Type in an xterm:

sudo ln -s /usr/bin/gcc /usr/bin/cc

If you are doing all these fancy loads and compiles you should probably also load the gnu-utils.dsl package from the repository as well.  It will add some functionality that you might need.

Posted by hillin-fantasia on Feb. 05 2006,07:45
Thanks clacker! Now I get Curses :)
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.