Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 7384  / 1 Year ago, sat, april 22, 2023, 8:48:39

What I want to do is install GraphViz for PHP on Ubuntu.



I tried pear install Image_GraphViz, it installed but does not work for me.



Then I tried downloading the file from here.



File name : libgv-php5_2.32.0-1~raring_amd64.deb When I run the file it says dependency is not satisfiable libgraphviz4.



All I want to do is run the code below which is from their documentation. Unfortunately I can not find GraphViz.php to download.



<?php
require_once 'GraphViz.php';

$gv = new Image_GraphViz();
$gv->addEdge(array('wake up' => 'visit bathroom'));
$gv->addEdge(array('visit bathroom' => 'make coffee'));
$gv->image();
?>


How can I fix this issue? Where can I download GraphViz.php


More From » php

 Answers
7

Just install the libgv-php5 Install libgv-php5 package:




PHP5 bindings for graphviz



Graphviz is a set of graph drawing tools. See the description of the graphviz
package for a full description.



This package contains the PHP5 bindings.




Using your favourite package management, e.g. apt-get, do:



sudo apt-get install libgv-php5


This should install the Graphviz for PHP in the paths used by the Ubuntu packaged version of PHP (automatically enabled in the php.ini .d directory).



You will then have to change your require_once statement to match the Ubuntu packaged version. From the manpage:



#!/usr/bin/php
<?
include('libgv-php5/gv.php');
...
?>


Also don't forget to restart your webserver if you're running PHP as a module.


[#29834] Monday, April 24, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
asketbridiculou

Total Points: 168
Total Questions: 116
Total Answers: 115

Location: Antigua and Barbuda
Member since Sat, Jan 28, 2023
1 Year ago
asketbridiculou questions
Thu, Dec 22, 22, 08:36, 1 Year ago
Thu, Jan 27, 22, 14:28, 2 Years ago
Tue, Nov 29, 22, 21:50, 1 Year ago
Sun, Jun 20, 21, 04:42, 3 Years ago
Sun, Aug 15, 21, 08:42, 3 Years ago
;