Perl GD模块无法安装- [英] Perl GD module won't install -
本文介绍了Perl GD模块无法安装-的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图弄清楚为什么无法在我的Debian 7服务器上安装GD perl模块.这是我安装核心内容的方法:
I'm trying to figure out why I can't get the GD perl module to install on my Debian 7 server. Here is how I installed the core stuff:
sudo apt-get install libgd-gd2-perl
然后运行-MCPAN进行安装,我得到:
Then running the -MCPAN to install, I get:
root@myserver:~# sudo perl -MCPAN -e 'install GD'
Going to read '/root/.cpan/Metadata'
Database was generated on Sun, 19 Jul 2015 21:41:02 GMT
Running install for module 'GD'
Running make for L/LD/LDS/GD-2.56.tar.gz
Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok
CPAN.pm: Going to build L/LD/LDS/GD-2.56.tar.gz
Configuring for libgd version 2.0.36.
Checking for stray libgd header files...none found.
Unknown option: installdirs
Usage: perl Build.PL [options]
Configure GD module.
Options:
-options "JPEG,FT,PNG,GIF,XPM,ANIMGIF" feature options, separated by commas
-lib_gd_path path path to libgd
-lib_ft_path path path to Freetype library
-lib_png_path path path to libpng
-lib_jpeg_path path path to libjpeg
-lib_xpm_path path path to libxpm
-lib_zlib_path path path to libpng
-ignore_missing_gd Ignore missing or old libgd installations and try to compile anyway
If no options are passed on the command line. The program will
attempt to autoconfigure itself with the gdlib-config program (present
in GD versions 2.0.27 or later). Otherwise it will prompt for these
values interactively.
Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
LDS/GD-2.56.tar.gz
/usr/bin/perl Build.PL --installdirs site -- NOT OK
Running Build test
Make had some problems, won't test
Running Build install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
我已经进行了大量的谷歌搜索,但似乎没有什么可以解决的.有什么建议吗?
I've done a load of googling, but nothing seems to fix it. Any suggestions?
推荐答案
您遇到的错误是
Unknown option: installdirs
Usage: perl Build.PL [options]
cpan
期望Build.PL
将其参数传递给Module :: Build,但是GD具有时髦的Build.PL
.让我们修复"它.
cpan
expects Build.PL
to pass its arguments to Module::Build, but GD has a funky Build.PL
. Let's "fix" it.
从一个临时目录中执行以下操作:
Execute the following from a temporary directory:
wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.56.tar.gz
-or-
curl -L http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.56.tar.gz >GD-2.56.tar.gz
tar xvzf GD-2.56.tar.gz
cd GD-2.56
perl -i~ -pE'say "Getopt::Long::Configure(qw( pass_through ));" if /GetOptions/;' Build.PL
/usr/bin/perl Build.PL --installdirs site
sudo ./Build.PL installdeps
./Build.PL make
./Build.PL test
sudo ./Build.PL install
这篇关于Perl GD模块无法安装-的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文