重新源码编译了一个gcc4.8.1,然后~/.bash_profile配置文件中的PATH环境变量也添加了,
该gcc的执行路径
而且执行gcc -v的时候,也显示gcc版本是4.8.1
当我源码编译安装YouCompleteMe的时候执行
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/download/clang+llvm . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
[lujiawen@ljwServer ycm_build]$ sudo cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/download/clang+llvm . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp -- The C compiler identification is GNU 4.4.7 -- The CXX compiler identification is GNU 4.4.7 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- NOTE: You appear to be on CentOS. In order to use this application, you require a more modern compiler than the default compiler on this platform. Please install the devtoolset-6 or greater. For example, see this link: https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ CMake Error at CMakeLists.txt:224 (message): Your C++ compiler does NOT fully support C++11.
通过上面的错误:他还是到/usr/bin到寻找gcc,然后找到了,有什么办法让她直接到我自己安装gcc目录下查找gcc执行文件啊!
系统本身有gcc,如果让系统选择你的新版本需要独立设置下
参考 http://blog.csdn.net/crisschan/article/details/61916581