首次使用CPAN尝试获取模块。为什么我不能安装?
cpan[9]> install GD::Graph
Running install for module 'GD::Graph'
Running make for R/RU/RUZ/GDGraph-1.48.tar.gz
Prepending blib/arch and blib/lib of 18 build dirs to PERL5LIB; for 'get'
Has already been unwrapped into directory /root/.cpan/build/GDGraph-1.48-LBF9mR
Prepending blib/arch and blib/lib of 18 build dirs to PERL5LIB; for 'make'
'/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512, won't make
Prepending blib/arch and blib/lib of 18 build dirs to PERL5LIB; for 'test'
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
手动安装后我得到了这个:
...
Installing /usr/local/share/man/man3/Graph::Matrix.3pm
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/lib64/perl5/auto/Graph'
mkdir /usr/local/lib64/perl5: File exists at /usr/share/perl5/ExtUtils/Install.pm line 483
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1
make: *** [pure_site_install] Error 17
答案 0 :(得分:3)
您正尝试在Graph
中创建目录/usr/local/lib64/perl5/auto
,但您无权这样做。
答案 1 :(得分:0)
另一种尝试的途径是Perl Package Manager。
在Windows中,您在Perl上搜索,它将列出适当的列表 "程序" ...
选择Perl软件包管理器。
然后在包管理器中,我搜索GD :: Graph并给出 四个选择。
我安装了GDGraph-XY。
然后我做了一个"使用GD :: Graph;"在.pl内部运行正常。