在 perl 中安装数学模块 CDF 时出错

在 perl 中安装数学模块 CDF 时出错

我正在尝试在 perl 中安装 Math::CDF 我尝试了 cpan -i Math::CDP 和从下载的文件安装在输入 make install 后都出现错误:

Running make install
make[1]: Nothing to be done for `all'.
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Math'
mkdir /opt/local/lib/perl5/site_perl: Permission denied at /opt/local/lib/perl5/5.16.3/ExtUtils/Install.pm line 494.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
make: *** [pure_site_install] Error 13
  CALLAHAN/Math-CDF-0.1.tar.gz
  /usr/bin/make install  -- NOT OK

这是 perl 的版本和路径:

bash-4.2$ which make
/usr/bin/make
bash-4.2$ which perl
/opt/local/bin/perl
bash-4.2$ perl -v

这是为 darwin-thread-multi-2level 构建的 perl 5,版本 16,subversion 3 (v5.16.3)

答案1

此问题可能是因为您没有写入这些文件的权限。您可以尝试在本地安装。

perl Makefile.PL PREFIX=/path/to/home/folder

然后你可以运行:

make
make install

相关内容