我正在使用Linux机器,在从Cpan安装JSON Perl模块时,遇到YAML未安装错误。任何帮助都是非常感谢的。
cpan[1]>install JSON
anifying blib/man3/JSON::backportPP::Boolean.3pm
Manifying blib/man3/JSON::backportPP.3pm
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/share/man/man3'
Do not have write permissions on '/usr/local/share/man/man3'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1
make: *** [pure_site_install] Error 13
MAKAMAKA/JSON-2.90.tar.gz
/usr/bin/make install -- NOT OK
----
You may have to su to root to install the package
(Or you may want to run something like
o conf make_install_make_command 'sudo make'
to raise your permissions.Warning (usually harmless): 'YAML' not installed, will not store persistent state
当我试图安装YAMl时,我得到这个错误。
cpan[1]>install YAML
ERROR: Can't create '/usr/local/share/man/man3'
Do not have write permissions on '/usr/local/share/man/man3'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1
make: *** [pure_site_install] Error 13
INGY/YAML-1.15.tar.gz
/usr/bin/make install -- NOT OK
----
You may have to su to root to install the package
(Or you may want to run something like
o conf make_install_make_command 'sudo make'
to raise your permissions.Warning (usually harmless): 'YAML' not installed, will not store persistent state
Failed during this command:
TYEMQ/Algorithm-Diff-1.1903.tar.gz : install NO
NEILB/Text-Diff-1.43.tar.gz : install NO
INGY/Spiffy-0.46.tar.gz : install NO
INGY/Test-Base-0.88.tar.gz : install NO
INGY/Test-YAML-1.06.tar.gz : install NO
INGY/YAML-1.15.tar.gz
先谢了
3条答案
按热度按时间j8ag8udp1#
'YAML' not installed, will not store persistent state
是无害。至于没有写
/usr/local/share/man/man3
的权限,有什么理由相信这是不正确的?如果您具有root访问权限,是否按照错误消息中的说明进行了操作?启动cpan,并执行以下命令:
如果您没有root访问权限,您是否在询问如何将模块安装到任意目录?我将使用
perlbrew
在您的home目录中安装perl
。0s7z1bwu2#
你是以普通用户的身份运行cpan吗?没有sudo或root访问权限吗?这可能就是原因。
uqdfh47h3#
我也有类似的问题。我在~/.bashrc文件中添加了以下内容。
然后在“PERL 5LIB”的定义之后添加以下内容:
“--安装基础“/home/用户名/perl 5”";导出PERL_MB_OPT;
“安装基础=/home/用户名/perl 5”;导出PERL_MM_OPT;
保存、退出和获取文件:
也许你可以使用下面的命令在终端中获得以上信息:
perl -I ~/perl5/lib/perl5 -Mlocal::lib