当我运行命令 cmake -DCMAKE_INSTALL_PREFIX=/opt/tsc
从源安装游戏时,终端显示:
cmake -DCMAKE_INSTALL_PREFIX=/opt/tsc
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:90 (file):
file Internal CMake error when trying to open file:
/home//TSC/tsc/CMakeFiles/2.8.12.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
for writing.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:16 (enable_language)
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:90 (file):
file Internal CMake error when trying to open file:
/home//TSC/tsc/CMakeFiles/2.8.12.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
for writing.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:16 (enable_language)
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
这里出了什么问题?我该如何修复?我正在运行 Ubuntu 14.04 x64。
答案1
安装所需的构建编译器和库:
sudo apt-get update && sudo apt-get install build-essential