Forum Moderators: coopster & phranque

Message Too Old, No Replies

PPM installation of Cpan packages

PPM installation of Cpan packages

         

shaan1980

10:17 am on Oct 5, 2004 (gmt 0)

10+ Year Member



Hi guys I have installed PPM version 2.2.0
I am trying to install the GD GD::Graph packages from CPAN.
how do i do this
I installed GDGraph
but when i say use GD::Graph in the code it doesn't work

anybody have the steps to get this package correctly installed.
thanks

Hanu

10:25 am on Oct 5, 2004 (gmt 0)

10+ Year Member



Start the CPAN shell using

perl -MCPAN -e shell

and type

install GD::Graph

to install the package. Watch the screen carefully to find out whether any tests fail. Most of the times failed tests are the cause for installation failure. If a test fails, you can try to force the installation by doing

force install GD::Graph

During installation you might be asked whether to install additional packages that GD::Graph dependends on. In that case, say yes.

shaan1980

3:02 pm on Oct 5, 2004 (gmt 0)

10+ Year Member



is there a difference between PPM and MCPAN installation
on this website ppm.activestate.com it says that the GD::Graph package is FAIL for solaris. does
that make a diffence.
please help .
Thanks

Hanu

5:56 pm on Oct 5, 2004 (gmt 0)

10+ Year Member



PPM is ActiveState's proprietary package manager that installs pre-compiled packages. This may be good for Windows platforms on which a C compiler isn't generally available. For Unix this isn't the preferred method. I take it that you use Solaris. If that's true, use CPAN to install your modules. The CPAN method compiles the package from scratch on your machine using your C compiler.

If CPAN isn't installed in your ActiveState Perl distribution, use PPM to install CPAN and then use CPAN to install your package.

Oh, I found the following on this [aspn.activestate.com] page:


GD

The GD module currently isn't available in the ActiveState PPM repository. This is because it is very difficult to build and is not suitable for ActiveState's automated build system, as it requires quite a external libraries. PPMs for the GD module can be found in other repositories and installed as follows:

ppm install [theoryx5.uwinnipeg.ca...]

This will install the GD PPM from the University of Winnipeg's version 5.8 PPM repository. For the 5.6 PPM repository, use:

ppm install [theoryx5.uwinnipeg.ca...]

shaan1980

12:47 am on Oct 6, 2004 (gmt 0)

10+ Year Member



I decided to go with Chart::Graph::Gnuplot

I don't get any error from the code posted below. But i don't get a png file either. does anyone have good documentation on this

#!/usr/local/bin/perl -w

print "Content-Type: text/html\n\n";

use CGI;
use File::Copy;
use CGI qw(:standard);
use DBI;

use Chart::Graph::Gnuplot qw(&gnuplot);
gnuplot({"title" => "foo",
"x2-axis label" => "bar",
"logscale x2" => "1",
"logscale y" => "1",
"output type" => "png",
"output file" => "/raid5/newhome/hmdc/gnuplot1.png",
"xtics" => [ ["small\\nfoo", 10], ["medium\\nfoo", 20], ["large\\nfoo", 30] ],
"ytics" => [10,20,30,40,50]},
"xdata" => "time",
"format" => ["x", "%m/%d"],
"timefmt"=> $date_format,
"extra_opts" => "set key left top Left",
[{"title" => "data1",
"type" => "matrix"}, [[1, 10],
[2, 20],
[3, 30]] ],
[{"title" => "data2",
"style" => "lines",
"type" => "columns"}, [8, 26, 50, 60, 70],
[5, 28, 50, 60, 70] ],
[{"title" => "data3",
"style" => "lines",
"type" => "file"}, "samplefile"],);