[SLL] cpan, perl module help
Derek Simkowiak
dereks at realloc.net
Sun Sep 14 12:25:01 PDT 2008
/Need ideas/help! /
I think this line is the core error message:
mkdir /usr/local/man: File exists
The command "mkdir /usr/local/man" is being run in the Makefile
and/or Install.pm:112. It is erroring out because /usr/local/man exists
on your system.
Here is how you can repro that error:
dereks at dell-laptop:~$ mkdir testdir
dereks at dell-laptop:~$ mkdir testdir
mkdir: cannot create directory `testdir': File exists
dereks at dell-laptop:~$
Makefiles (and installer scripts, like Install.pm) usually call
mkdir to ensure that a directory exists, before copying files there. In
this case, the installer tried to mkdir /usr/local/man, to install some
man pages.
But the script needs to use the -p option to mkdir. The -p means
"no error if existing, and make parent directories as needed".
I believe the root cause is a missing "-p" option to mkdir in the
Makefile. For example:
# First, there's an error because the parent "lipstick" doesn't exist:
dereks at dell-laptop:~$ mkdir /home/dereks/lipstick/on/a/pig
mkdir: cannot create directory `/home/dereks/lipstick/on/a/pig': No such
file or directory
# Now, with -p, the parents are all automatically created:
dereks at dell-laptop:~$ mkdir -p /home/dereks/lipstick/on/a/pig
# Now, with -p, there is no error due to pre-existing directory
dereks at dell-laptop:~$ mkdir -p /home/dereks/lipstick/on/a/pig
dereks at dell-laptop:~$
The way I'd fix this problem is to look at Install.pm:112, figure
out where the Makefile is, then find the target "install:" in the
Makefile, then find the line that calls "mkdir /usr/local/man", and edit
it to be "mkdir -p /usr/local/man". Re-run "install Convert::ASN1" and
you should be okay.
If you're feeling like a good sumaritan, then make a one-liner patch
with your fix and email it to the author of the Convert::ASN1 package,
along with an error report.
--Derek
Mike Bate wrote:
> Trying to add a few dependencies to Perl, using CPAN. Here's the error
> from Convert::ASN1,but similar for RDF::Core
>
> $ sudo cpan
> cpan> install Convert::ASN1
>
> ...
> Seems to be ok until the end, when it runs 'make install', see below.
>
> Need ideas/help!
>
> ...
> /usr/bin/make test -- OK
>
> Running make install
> mkdir /usr/local/man: File exists at
> /usr/share/perl/5.8/ExtUtils/Install.pm line 112
> make: *** [pure_site_install] Error 17
> /usr/bin/make install -- NOT OK
More information about the linux-list
mailing list