PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 11, 2022

[FIXED] How can I get my Perl program to access GD?

 October 11, 2022     gd, graphics, perl     No comments   

Issue

I am using Linux Fedora 12.

I am learning Perl, and can run the simple "Hello world" programs, so Perl is install ok, but now I want to use GD in a Perl program, which starts:

#!/usr/bin/perl -w

use GD;

.. but it fails with:

[Harry@SN... ~]$ perl /home/Harry/perlprogs/trygraphic.pl
Can't locate GD.pm in @INC (@INC contains: ...

Please, what do I need to do? And, also very important: how do I find out what I need to know, to do it?

I believe I have installed GD, when I try the first line here:

[root@SN ... Harry]# perl -MCPAN -e install GD::Graph
[root@SN ... Harry]# 

I get the second line with no other output between.


Solution

Thanks for the tantalizing answers. Taking the hint from @Boris Dappen, (can't find know how to do the umlaut, sorry) I tried yum install gdwhich gave me:

Loaded plugins: presto, refresh-packagekit

Setting up Install Process

No package perl-gd available. * Maybe you meant: perl-GD

So I used yum install perl-GD. and then use GDin the proram worked ok.



Answered By - Harry Weston
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing