如何在 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

相關內容