CMake 找不到 X11

CMake 找不到 X11

我正在尝试使用 CMake 在 Ubuntu 12.04.3 LTS 上编译 Minetest 0.4.10,但出现此错误:

andrew@rasts-tv:~$ cmake \Minetest-0.4.10
-- *** Will build version 0.4.10 ***
-- IRRLICHT_SOURCE_DIR = 
-- IRRLICHT_INCLUDE_DIR = IRRLICHT_INCLUDE_DIR-NOTFOUND
-- IRRLICHT_LIBRARY = IRRLICHT_LIBRARY-NOTFOUND
-- Could NOT find IRRLICHT (missing:  IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) 
-- CURL_INCLUDE_DIR = CURL_INCLUDE_DIR-NOTFOUND
-- CURL_LIBRARY = CURL_LIBRARY-NOTFOUND
-- CURL_DLL = 
-- GetText disabled
CMake Error at /usr/share/cmake-2.8/Modules/FindX11.cmake:411 (MESSAGE):
  Could not find X11
Call Stack (most recent call first):
  src/CMakeLists.txt:147 (find_package)


-- Configuring incomplete, errors occurred!

我安装了 LXDE(轻量级 X11 桌面环境),但仍然显示相同的错误。我该怎么办?

这是我安装 x11 头文件后收到的错误消息:

andrew@rasts-tv:~$ cmake \Minetest-0.4.10
-- *** Will build version 0.4.10 ***
-- IRRLICHT_SOURCE_DIR = 
-- IRRLICHT_INCLUDE_DIR = IRRLICHT_INCLUDE_DIR-NOTFOUND
-- IRRLICHT_LIBRARY = IRRLICHT_LIBRARY-NOTFOUND
-- Could NOT find IRRLICHT (missing:  IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) 
-- CURL_INCLUDE_DIR = CURL_INCLUDE_DIR-NOTFOUND
-- CURL_LIBRARY = CURL_LIBRARY-NOTFOUND
-- CURL_DLL = 
-- GetText disabled
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91(MESSAGE):
Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252(_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-2.8/Modules/FindOpenGL.cmake:153 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/CMakeLists.txt:148 (find_package)


-- Configuring incomplete, errors occurred!

答案1

激光去极化仪X11不太一样。你可能需要 X11 头文件。尝试安装libx11-dev

sudo apt-get install libx11-dev

答案2

尝试运行命令

sudo apt install xorg-dev

相关内容