1

How do I use graphics.h in Ubuntu 18.04? I am getting the following error message when trying to follow the instructions in this answer to compile and install libgraph in order to use graphics.h on Ubuntu.

$ sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8 \  
>   guile-1.8-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev \  
>   libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev \  
>   libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev \  
>   libslang2-dev libasound2 libasound2-dev  
[sudo] password for linux: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package guile-1.8
E: Couldn't find any package by glob 'guile-1.8'
E: Couldn't find any package by regex 'guile-1.8'
E: Unable to locate package guile-1.8-dev
E: Couldn't find any package by glob 'guile-1.8-dev'
E: Couldn't find any package by regex 'guile-1.8-dev'
E: Unable to locate package libesd0-dev
karel
  • 114,770
nilopy
  • 11
  • What is your Ubuntu version? What you are going to achieve? What software are you trying to compile? Please edit your question and answer these questions. Could you please insert text output instead of images? – N0rbert Jun 02 '18 at 10:56
  • @N0rbert I have edited the question in order to answer your questions, and inserted text output instead of the screenshot image of the terminal output. – karel Jun 02 '18 at 12:12

1 Answers1

2

Three of the packages in the command in your question that returned an error message have been updated in 18.04. In the "Install some additional packages" step in this answer open the terminal and type:

sudo apt install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 \
  guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev \
  pulseaudio-esound-compat libdirectfb-dev libdirectfb-extra libfreetype6-dev \
  libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev \
  libslang2-dev libasound2 libasound2-dev  

To make it easier to copy/paste it in the terminal here is the previous command reformatted as a single line:

sudo apt install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev pulseaudio-esound-compat libdirectfb-dev libdirectfb-extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound2-dev
karel
  • 114,770
  • http://download.savannah.gnu.org/releases/libgraph/libgraph-1.0.2.tar.gz i have tried to install this software link above but showing this error below .... guile-libgraph.c:25:10: fatal error: libguile.h: No such file or directory #include <libguile.h> ^~~~~~~~~~~~ – nilopy Jun 04 '18 at 09:04
  • The libguile.h file is located at /usr/include/guile/2.0/libguile.h in Ubuntu 18.04 assuming that you installed guile-2.0-dev as the command said to do. Try adding a symbolic link to the libguile.h file to the libgraph-1.0.2 directory. – karel Jun 04 '18 at 09:19