perl - 无法在 Perl 中安装 GD 模块
问题描述
我无法在 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
推荐阅读
- c# - 是否可以从中间件元素重定向?
- html - 在容器外扩展颜色背景
- ruby-on-rails - Ruby on Rails 上的无效字节序列错误加载页面
- python-3.x - 为电报运行机器人期间出现错误
- mura - 如何将非 Mura 主题上传到 Mura
- amazon-web-services - 不属于 AWS 的 ELB 管理器可以公有 IP 吗?
- python - 使用字符串打开文件
- ibm-integration-bus - 如何从运行在 IBM IIB 10+ 上的 ESQL 代码获取代理的 UUID、主机名?
- javascript - PWA 缓存的最大值是多少?我可以缓存所有内容吗?
- java - 子字符串(java)不像我预期的那样工作