Click to See Complete Forum and Search --> : CPAN problem


anarcholinuxism
04-28-2003, 11:56 AM
I know next to nothing about perl, and would rather avoid getting too
deep into it, but I have been trying to set up the bbs sytem provided by
the scoop project.

I seem to be having a problem with the install process though, and it
seems to be related to the updating of perl modules.

If I run

bash%# perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'

I get

CPAN: Storable loaded ok
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
http://cpan.hambule.co.uk/authors/01mailrc.txt.gz
Going to read y/sources/authors/01mailrc.txt.gz
Could not pipe[ --decompress --stdout y/sources/authors/01mailrc.txt.gz
|]: No
such file or directory at /usr/lib/perl5/5.8.0/CPAN.pm line 5642.

and the scoop install crashes out with the same message. I've looked at
the files but a CPAN.pm appears to be an unintelligible 7000 line
script. Shall I just give up?

bwkaz
04-28-2003, 02:08 PM
Have you set up CPAN yet? It needs to know how to deal with (for example) .gz files...

I don't remember for sure, but I believe you can just run perl -MCPAN -e shell, and it'll run through the setup questions if it isn't set up already.

anarcholinuxism
04-29-2003, 02:07 AM
yes, I've done quite a few things already, none of which I'm actually sure of what I'm doing, just following suggestions in the very complicated documentation. CPAN is installed and setup by default as a far as I can see, just in case I tried to use it recursively to reinstall itself again and get the following dialogue

bash-2.05b$ perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.61)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install CPAN
CPAN: Storable loaded ok
Going to read y/sources/authors/01mailrc.txt.gz
Can't exec "--decompress": No such file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/IO/File.pm line 166, <FIN> line 1.
Could not pipe[ --decompress --stdout y/sources/authors/01mailrc.txt.gz |]: No
such file or directory at /usr/lib/perl5/5.8.0/CPAN.pm line 5642, <FIN> line 1


I wouldn't know how to get any other modules or how to know if I'd succeeded either. It's not perl I want to learn, I'd just like to set up scoop! Do you think if I just uninstall perl,mod-perl and apache and start again from scratch it might help.

bwkaz
04-29-2003, 09:43 AM
Why don't you take a look yourself in /usr/lib/perl5/5.8.0/CPAN/Config.pm.

That file will contain all the settings for stuff like how to un-gzip stuff. Especially look at the 'gzip' => q[/path/to/gzip] setting; make sure the path is correct, and that it isn't just nothing. My guess is that your Config.pm gzip line looks like:

'gzip' => q[]

Which is wrong. You need to find gzip (on my machine, it's /bin/gzip) and put the path to it inside the square brackets.

You can't install CPAN because to do that, it needs gzip.

anarcholinuxism
04-30-2003, 02:58 AM
Thank you that worked a treat, it seems to get a bit further along with executing the script now but crashes out further on now with this error message


Scanning cache y/build for sizes
gzip: y/sources/authors/id/A/AN/ANDK/CPAN-1.70.tar.gz: No such file or directory
CPAN.pm needs either both external programs tar and gzip installed or
both the modules Archive::Tar and Compress::Zlib. Neither prerequisite
is available. Can't continue.


now I did the same for tar as I did for gzip in
/usr/lib/perl5/5.8.0/CPAN/Config.pm
, but I don't know what syntax I use to get the modules installed.

bwkaz
04-30-2003, 09:40 AM
You should just be able to install Archive::Tar and install Compress::Zlib -- however, if tar and/or gzip aren't working, then that isn't going to work either.

From the error, I don't think that tar or gzip missing is actually the problem, though. It seems that the problem is CPAN-1.70.tar.gz is missing, but something is telling CPAN.pm that it isn't.

Where do you have the CPAN home, build directory, and source directory? (options build_dir, keep_source_where, and cpan_home in Config.pm)

Try cleaning out those directories, maybe; that might help.

anarcholinuxism
05-01-2003, 06:26 AM
I'm getting a lot further along now but every time I run

install Bundle::CPAN it still crashes out at the end


Checking if your kit is complete...
Looks good
Writing Makefile for CPAN
-- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Bundle summary: The following items in bundle Bundle::CPAN had install
+ation
problems:
Digest::MD5 Compress::Zlib Archive::Tar Bundle::libnet Term::ReadKey
Term::ReadLine::Perl CPAN::WAIT CPAN and the following items had pro
+blems
during recursive bundle calls: Net::Cmd Net::Telnet


I've made afew changes to my Config.pm which helped the script run a bit further but I think there must still be problems, for instance should there be a path in for make


commit Commit changes to disk
defaults Reload defaults from disk
init Interactive setting of all options

build_cache 10
build_dir /home/sean/downloads/scoop/scoop-0.9/scripts/y/
+build
cache_metadata 1
cpan_home /home/sean/.cpan
dontload_hash
ftp
ftp_proxy
getcwd cwd
gzip /bin/gzip
http_proxy
inactivity_timeout 0
index_expire 1
inhibit_startup_message 0
keep_source_where /home/sean/downloads/scoop/scoop-0.9/scripts/y/
+sources
links
make
make_arg
make_install_arg
makepl_arg
ncftp
ncftpget
no_proxy
pager
prerequisites_policy ask
scan_cache atstart
shell
tar /bin/tar
term_is_latin 1
unzip
urllist
http://cpan.hambule.co.uk/
wait_list
wait://ls6-www.informatik.uni-dortmund.de:1404
wget

bwkaz
05-01-2003, 09:40 AM
Yeah, a lot of those need to be filled in properly. I wonder who configured CPAN the first time? From the sounds of it, it never asked you... oh well, whatever.

Anyway, yeah, make should be set to /usr/bin/make, pager should be set to /bin/less (probably), and shell should be set to either /bin/sh or /bin/bash (preferably the latter). You might also want to consider installing (if it isn't) and setting up the path to wget (the install should put it in /usr/bin), in case the Perl-internal downloading routines don't work for whatever reason. You might also want to set up the "unzip" entry -- install InfoZIP's unzip package (if it isn't already), then set unzip to /usr/bin/unzip.