Redhat Linux 6.5 Perl GD CPAN Module yum

天涯浪子 提交于 2019-12-25 12:32:34

问题


when i try to install "GD" (perl -e shell -MCPAN ->(next step) cpan[1]> install GD) on Redhat 6.5 i got the error:

-> CPAN.pm: Building L/LD/LDS/GD-2.53.tar.gz

UNRECOVERABLE ERROR Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher. If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd. Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] CPAN: YAML loaded ok (v0.90) LDS/GD-2.53.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Could not read metadata file. Falling back to other methods to determine prerequisites Failed during this command: LDS/GD-2.53.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512 <-

I tryed to install "libgd 2.0.28 or higher" but don't find this in "yum".

locate libgd (shows):

/usr/lib64/libgd.so.2 /usr/lib64/libgd.so.2.0.0

Does anyone know an advice?


回答1:


Many perl modules are available already built and packaged for RHEL and derivatives such as CentOS. In the case of perl-GD, it seems it is available in the CentOS in the base repo even though it is not in the RHEL repo.

However you can still use the Centos repo by adding it to your yum configuration. Create a file /etc/yum.repos.d/cantos.repo containing:

[centos]
name=CentOS $releasever - $basearch
baseurl=http://mirror.centos.org/centos-6/6/os/$basearch/
enabled=0
gpgcheck=0

After which you should be able to install perl-GD

yum install --enablerepo centos perl-GD

It looks as though the current version of perl-GD for centos is 2.44.

If you do need a newer version that that, you will either need to find a 3rd party yum repo which has the later version of libgd available, or compile it from source. In a quick google I could not find the former, so I would recommend you download the latest source package and install that.




回答2:


You need the package gd-devel then rebuild the GD module.



来源:https://stackoverflow.com/questions/22980915/redhat-linux-6-5-perl-gd-cpan-module-yum

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!