如何在 Ubuntu 18.04 中将 graphics.h 与 libgraph 一起使用?

如何在 Ubuntu 18.04 中将 graphics.h 与 libgraph 一起使用?

如何在 Ubuntu 18.04 中使用 graphics.h?尝试按照以下说明操作时,我收到以下错误消息这个答案编译并安装 libgraph 以便在 Ubuntu 上使用 graphics.h。

$ 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

答案1

问题中返回错误消息的命令中的三个软件包已在 18.04 中更新。在“安装一些附加软件包”步骤中这个答案打开终端并输入:

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  

为了更容易在终端中复制/粘贴,这里将上一个命令重新格式化为单行:

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

相关内容