1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Amazon Linux 2023でOpenCV-Pythonとdlibを動かす

Posted at

Ubuntuではlibgl1-mesa-devを入れればいいと言う記事が各所ありますがAmazon Linx 2023は情報が少ないのでポストしておきます。

まずdlibにはcmakeが必要なのでインストールしてからdlibインストール

sudo dnf install -y cmake
# 容量やスペックに余裕があるなら開発ツールも入れておきましょ
sudo dnf groupinstall -y "Development tools"
# dlibインストール
pip install dlib

Amazon Linux 2023ではlibgl1-mesa-devパッケージがないのでGL関連のライブラリを確認します。

sudo dnf search libgl

Last metadata expiration check: 0:30:00 ago on Wed Jul 12 02:34:36 2023.
=============================================================================================== Name & Summary Matched: libgl ===============================================================================================
libGLEW.x86_64 : libGLEW
libglvnd-core-devel.x86_64 : Core development files for libglvnd
libglvnd-devel.x86_64 : Development files for libglvnd
libglvnd-egl.x86_64 : EGL support for libglvnd
libglvnd-gles.x86_64 : GLES support for libglvnd
libglvnd-glx.x86_64 : GLX support for libglvnd
libglvnd-opengl.x86_64 : OpenGL support for libglvnd
mesa-libGL.x86_64 : Mesa libGL runtime libraries
mesa-libGL-devel.x86_64 : Mesa libGL development package
mesa-libGLU.x86_64 : Mesa libGLU library
mesa-libGLU-devel.x86_64 : Development files for mesa-libGLU
==================================================================================================== Name Matched: libgl ====================================================================================================
libglvnd.x86_64 : The GL Vendor-Neutral Dispatch library
mesa-libglapi.x86_64 : Mesa shared glapi

mesa-libGLmesa-libGL-develをインストールします

sudo dnf install -y mesa-libGL mesa-libGL-devel

これでpythonからdlibとopencvが動くはずです。以上。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?