apt 安装
sudo apt install libdrm-dev
源码安装
- 安装工具
python3 -m pip install mesonpython3 -m pip install ninja
- 源码编译
git clone https://gitlab.freedesktop.org/mesa/drm.gitmkdir buildmeson setup build --prefix=$HOME/.drm/install# 或 重新配置到/usr/local# meson setup build --reconfigure --prefix=/usr/localninja -C buildninja -C build installecho 'export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/.drm/install/lib/x86_64-linux-gnu/pkgconfig' >> ~/.bashrcsource ~/.bashrcsudo ldconfig# 检查版本pkg-config --modversion libdrm# uninstall 则# ninja -C build uninstall
参考
- meson
- drm