Poisson
Poisson

Reputation: 1623

install CPAN module

I have a problem when i want to install perl module I make " cpan" to install cpan , but i get this "

Terminal does not support AddHistory.

Your configuration suggests that CPAN.pm should use a working
directory of
/home/cyrine/.cpan
Unfortunately we could not create the lock file
/home/cyrine/.cpan/.lock
due to permission problems.

Please make sure that the configuration variable $CPAN::Config->{cpan_home} points to a directory where you can write a .lock file. You can set this variable in either a CPAN/MyConfig.pm or a CPAN/Config.pm in your @INC path; You don't seem to have a user configuration (MyConfig.pm) yet.

i make "y" then i got this strange message :

mkdir /home/cyrine/.cpan/CPAN: Permission denied at /usr/share/perl/5.10/CPAN/Shell.pm >line 656

Any idea please? Thank you

Upvotes: 0

Views: 2157

Answers (1)

Dave Sherohman
Dave Sherohman

Reputation: 46225

The immediate cause of this problem is that you don't have write permissions on /home/cyrine/.cpan. In my experience, this is most often the result of logging in as a normal user, then running cpan for the first time on that account in a su session, causing the CPAN configuration to be created in ~cyrine (because you have cyrine's environment), but owned by root (because su has given you root's permissions). Assuming that is the case, you should be able to resolve this my suing to root, running the command chown -R cyrine.cyrine /home/cyrine/.cpan and then running cpan as user cyrine.

Upvotes: 3

Related Questions