簡體   English   中英

無法在 Perl 中安裝 GD 模塊

[英]Not able to install GD module in Perl

我無法在 PErl 中安裝 GD 模塊。 我已經完成了 CPAN GD 但這給了我錯誤:

Reading '/home/harsh/.cpan/Metadata'
  Database was generated on Mon, 28 Sep 2020 02:17:03 GMT
Running install for module 'GD'
Checksum for /home/harsh/.cpan/sources/authors/id/R/RU/RURBAN/GD-2.73.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring R/RU/RURBAN/GD-2.73.tar.gz with Makefile.PL
Notice: Type perl Makefile.PL -h for command-line option summary.

Package gdlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `gdlib.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gdlib' found
 at Makefile.PL line 451.
*** can not find package gdlib
*** check that it is properly installed and available in PKG_CONFIG_PATH
 at Makefile.PL line 451.
Warning: No success on command[/home/harsh/perl5/perlbrew/perls/perl-5.28.0/bin/perl Makefile.PL]
  RURBAN/GD-2.73.tar.gz
  /home/harsh/perl5/perlbrew/perls/perl-5.28.0/bin/perl Makefile.PL -- NOT OK

每當我運行我的文件時,它都會給出:

Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: /home/harsh/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux /home/harsh/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0 /home/harsh/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux /home/harsh/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0) at generate_feedburner_graph.perl line 18.
BEGIN failed--compilation aborted at generate_feedburner_graph.perl line 18. 

我也看到了這個運行 sudo apt-get install libgd2-xpm-dev 的解決方案,但這說

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libgd2-xpm-dev

我正在使用 Ubuntu 18.04

您需要安裝libgd-dev

$ sudo apt-get install libgd-dev

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM