monkfan has asked for the wisdom of the Perl Monks concerning the following question:

My fellow monks,

I am trying to install Benchmark::Timer in a remote Linux server, locally in my own home directory. I am using CPAN shell.

I generally have no problem installing CPAN modules locally, in this particular server. It never ask any specific permission. Only this time it gives this message.
/usr/bin/perl -Iinc Makefile.PL --config= --installdeps=Time::HiRes,0, +Statistics::PointEstimation,0 *** Installing dependencies... *** You are not allowed to write to the directory '/home/grad/myname/. +cpan/sources'; the installation may fail due to insufficient permissions.
And then it stuck there. Then I do a ^Z to the process, then it gives this:

/usr/bin/make install -- NOT OK You may have to su to root to install the package
I already perform "force" install but still giving the same message.
I encounter the same permission problem while installing Acme::Comment.
Is there any way around I can get this kind of module installed?

Regards,
Edward

Replies are listed 'Best First'.
Re: Why permission required while installing certain CPAN module locally?
by BUU (Prior) on Nov 02, 2005 at 05:39 UTC
    The error seems fairly obvious. You are not allowed to write to the directory '/home/grad/myname/.cpan/source So fix the permissions of that directory.
      Dear BUU,
      I think I've got the permission correct already:
      drwxrwxrwx 4 myname grad03 4096 Sep 28 11:47 sources
      But I still can't get it installed.

      Regards,
      Edward
        777 permission? Eeew. Anyway, even 777 permission might not be enough - if the filesystem is mounted read-only for instance, or if you have some weird ACL setting.

        What happens if you try to do things by hand?

        Perl --((8:>*

        I've run into this on occasion, when the system thought the files belonged to someone other than me (as user). I'm wondering whether that may be what's giving you trouble? Who "owns" the files you're trying to write?

Re: Why permission required while installing certain CPAN module locally?
by virtualsue (Vicar) on Nov 02, 2005 at 10:00 UTC
    Without seeing the situation firsthand, it's hard to figure out what has happened. You might try removing /home/grad/myname/.cpan and then starting again. You'll have to reconfigure CPAN.pm, so take note of your settings before you do this.
Re: Why permission required while installing certain CPAN module locally?
by jesuashok (Curate) on Nov 02, 2005 at 05:01 UTC
    Hi,

    Generally when you install Perl modules as a normal use, You wont have any problems upto

    perl Makefile.PL

    make

    but when you use

    make install

    you will get lot of Issues. Because that tries to copy or move files from local directory to /bin/ /usr/bin.

    These are all some system related directories there the root user has the access.

    If you get admin access there won't be much Issues.

    "Keep pouring your ideas"

      jesuashok, unless you specify otherwise when issuing the perl Makefile.PL command, pure Perl modules will not typically install anything in /bin or /usr/bin. Usually, modules will be installed in one of the directories specified in @inc. Have a peek at the Makefile.PL file in question to see if it has a specific install dir mentioned. Run a quick perl -V to see your current @inc.

      -- vek --