error: ‘for’ loop initial declarations are only allowed in C99 mode for(int i = 0; i < 31; i++){ note提示里面已有解决方法 note: use option -std=c99 or -std=gnu99 to compile your code 所以gcc只需要添加参数: gcc -std=c99 target.c 其他版本c11: gcc -std=c1x gcc -std=c11 gcc --version //查看版本 error: unknown type name ‘sigset_t’ warning: implicit declaration of function ‘sigemptyset’ [-Wimplicit-function-declaration] error: ‘SIG_BLOCK’ undeclared (first use in this function) 解决方法: gcc -std=gnu99 target.c man文档不全 下载: yum install man-pages 其他命令不全: yum -y install gdb yum -y install tree