没有'/ usr / local / share / man / man3'的写权限

时间:2016-01-08 21:00:45

标签: linux perl

从Cpan安装JSON Perl模块时,我正在使用Linux机器并且没有安装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     

提前致谢

2 个答案:

答案 0 :(得分:3)

'YAML' not installed, will not store persistent state无害。

至于没有写入/usr/local/share/man/man3的许可,有任何理由相信这是不正确的吗?

如果您具有root访问权限,是否按照错误消息中的说明进行操作?启动cpan,并执行以下命令:

o conf make_install_make_command 'sudo make'
o conf commit

如果您没有root访问权限,是否询问如何将模块安装到任意目录?我会使用perlbrew在您的主目录中安装perl

答案 1 :(得分:0)

您是否以普通用户身份运行cpan?没有sudo或root访问权限?这可能就是原因。