引导 cmake 时出错

引导 cmake 时出错

这是我运行 ./bootstrap 时遇到的错误

---------------------------------------------
CMake 3.6.1, Copyright 2000-2016 Kitware, Inc.
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.

---------------------------------------------
Log of errors: /home2/virionrp/cmake-3.6.1/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------

日志内容如下:

Checking for GNU toolchain
Try: gcc
Line: gcc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------
int main() { return 0; }
------------------------------------------
./bootstrap: line 572: /usr/bin/gcc: Permission denied
Test failed to compile
Checking for Clang toolchain
Try: clang
Line: clang  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------
int main() { return 0; }
------------------------------------------
./bootstrap: line 572: clang: command not found
Test failed to compile
Checking for XL toolchain
Try: xlc
Line: xlc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------
int main() { return 0; }
------------------------------------------
./bootstrap: line 572: xlc: command not found
Test failed to compile
Checking for PGI toolchain
Try: pgcc
Line: pgcc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------
int main() { return 0; }
------------------------------------------
./bootstrap: line 572: pgcc: command not found
Test failed to compile
Checking for PathScale toolchain
Try: pathcc
Line: pathcc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------
int main() { return 0; }
------------------------------------------
./bootstrap: line 572: pathcc: command not found
Test failed to compile
Try: cc
Line: cc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------

#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif

#include<stdio.h>

#if defined(__CLASSIC_C__)
int main(argc, argv)
  int argc;
  char* argv[];
#else
int main(int argc, char* argv[])
#endif
{
  printf("%d%c", (argv != 0), (char)0x0a);
  return argc-1;
}

------------------------------------------
./bootstrap: line 572: /usr/bin/cc: Permission denied
Test failed to compile
Try: gcc
Line: gcc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------

#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif

#include<stdio.h>

#if defined(__CLASSIC_C__)
int main(argc, argv)
  int argc;
  char* argv[];
#else
int main(int argc, char* argv[])
#endif
{
  printf("%d%c", (argv != 0), (char)0x0a);
  return argc-1;
}

------------------------------------------
./bootstrap: line 572: /usr/bin/gcc: Permission denied
Test failed to compile
Try: xlc
Line: xlc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------

#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif

#include<stdio.h>

#if defined(__CLASSIC_C__)
int main(argc, argv)
  int argc;
  char* argv[];
#else
int main(int argc, char* argv[])
#endif
{
  printf("%d%c", (argv != 0), (char)0x0a);
  return argc-1;
}

------------------------------------------
./bootstrap: line 572: xlc: command not found
Test failed to compile
Try: icc
Line: icc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------

#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif

#include<stdio.h>

#if defined(__CLASSIC_C__)
int main(argc, argv)
  int argc;
  char* argv[];
#else
int main(int argc, char* argv[])
#endif
{
  printf("%d%c", (argv != 0), (char)0x0a);
  return argc-1;
}

------------------------------------------
./bootstrap: line 572: icc: command not found
Test failed to compile
Try: tcc
Line: tcc  cmake_bootstrap_117682_test.c -o cmake_bootstrap_117682_test
----------  file   -----------------------

#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif

#include<stdio.h>

#if defined(__CLASSIC_C__)
int main(argc, argv)
  int argc;
  char* argv[];
#else
int main(int argc, char* argv[])
#endif
{
  printf("%d%c", (argv != 0), (char)0x0a);
  return argc-1;
}

------------------------------------------
./bootstrap: line 572: tcc: command not found
Test failed to compile

我对这些东西确实不擅长,因此如果能提供任何帮助我将非常感激。

相关内容