{"id":55,"date":"2008-01-21T10:44:26","date_gmt":"2008-01-21T09:44:26","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=55"},"modified":"2008-01-21T11:44:45","modified_gmt":"2008-01-21T10:44:45","slug":"installing-the-gdgraph-perl-module-on-ubuntu-linux","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=55","title":{"rendered":"Installing the GD::Graph Perl module on Ubuntu Linux"},"content":{"rendered":"<p>I have a couple of perl projects that make use of the GD::Graph module and I needed to set them up on a new machine.  I was expecting to install the module without any problems but I was wrong.  With a live internet connection I started off by starting the CPAN shell by typing the following in a bash shell<\/p>\n<p>sudo perl  -MCPAN -e shell<\/p>\n<p>Since it was the first time I had run this command on this particular machine I had to answer a lot of questions but simply selected the defaults for everything as this usually works for me.  Once in the CPAN shell I entered<\/p>\n<p>install Bundle::CPAN<\/p>\n<p>and selected all of the defaults again.  Once the CPAN bundle had finished installing I tried to install GD::Graph by typing<\/p>\n<p>install GD::Graph<\/p>\n<p>but it failed with  hundreds of errors &#8211; the first of which was<\/p>\n<p>GD.xs:7:16: error: gd.h: No such file or directory<\/p>\n<p>This was fixed with the following apt-get command (in the bash shell)<\/p>\n<p>sudo apt-get install libgd2-xpm-dev<\/p>\n<p>back in the CPAN shell I still couldn&#8217;t get GD::Graph to build and I guessed this was because of some left over files from the failed build.  I don&#8217;t know the command to clean things up inside the CPAN shell and am too lazy to read the docs so I simply went into the .cpan\/build directory in my home directory and deleted anything that started with GD &#8211; eg<\/p>\n<p>rm -rf GD-2.35-HC_vkB<\/p>\n<p>rm -rf  GDGraph-1.44-Evfibe<\/p>\n<p>and so on.  Those strings at the end (VkB and so on) look random so they might be different on your machine.  Then I went back into the CPAN shell  and ran<\/p>\n<p>install GD::Graph<\/p>\n<p>again.  There were a few dependencies which the script fetched and installed for me but everything worked smoothly. With a bit of luck these notes will be of use to someone else out there &#8211; please let me know if this is the case.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a couple of perl projects that make use of the GD::Graph module and I needed to set them up on a new machine. I was expecting to install the module without any problems but I was wrong. With a live internet connection I started off by starting the CPAN shell by typing the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,7],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-linux","category-programming"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-T","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":0,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}