可以使用命令查看有哪些版本的编译器: sudo yum search devtoolset 其中,我们选择安装devtoolset-7,选择all,代表所有工具都一次性安装下来。 devtoolset-7-gcc-c++ 安装成功如下: rpm -qa | grep devtoolset 安装成功后,使用命令: ls /opt/ 可以看到有一个rh的目录 然后查看rh的目录,会发现有一个devtoolset -7的目录 查看devtoolset-7目录,里面会有一个叫做enable的配置文件。 由于目前我们的gcc/g++版本还是我们原来的那个版本,因此我们需要在enable配置文件中加载一下; 使用命令: source /opt/rh/devtoolset-7/enable 此时,加载后的 使用命令: vi ~/.bashrc 打开之后,将source /opt/rh/devtoolset-7/enable添加到配置文件中。 此后,每次打开终端,都会自动加载到最新安装的版本了。
RUN yum install -y centos-release-scl unzip tree mlocate vim wget ccache sudo && yum install -y devtoolset -7/root/usr/bin/gcc" >> ${APP_ROOT}/etc/scl_enable && echo "export CXX=/opt/rh/devtoolset-7/root/ /compile_bazel.shUsing built-in specs.COLLECT_GCC=gccCOLLECT_LTO_WRAPPER=/opt/rh/devtoolset-7/root/usr /configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-7/root /usr --mandir=/opt/rh/devtoolset-7/root/usr/share/man --infodir=/opt/rh/devtoolset-7/root/usr/share/info
devtoolset-7-gcc-c++: sudo dnf install devtoolset-7-gcc-c++ 安装完毕后,若要在当前控制台使用gcc 7.3,使用命令: scl enable devtoolset 1772066 https://www.softwarecollections.org/en/docs/ https://www.softwarecollections.org/en/scls/rhscl/devtoolset
以 CentOS 为例,看看如何通过 SCL 维护多版本的 gcc: shell> yum install centos-release-scl shell> yum install devtoolset -7 shell> gcc -v gcc version 4.4.7 *** shell> scl enable devtoolset-7 bash shell> gcc -v gcc version
想要这么做,请在你的 CentOS 终端输入下面的命令 sudo yum install devtoolset-7 想要访问 GCC 7,你需要使用软件集合工具scl,启动一个新的 shell: scl enable devtoolset-7 bash 现在,你检查你的 GCC 版本,你可以注意到 GCC7 已经是你的当前 shell 的默认版本: gcc --version gcc (GCC) 7.3.1
Linux release 7.6.1810 (Core) 1. gcc版本升级 #sudo yum install centos-release-scl -y #sudo yum install devtoolset -7 -y #sudo yum install devtoolset-8 -y 安装的是 devtoolset-7 和 devtoolset-8, 安装完成后全部文件在/opt/rh目录下: # ls /opt/rh/ devtoolset-7 devtoolset-8 在所登录的会话生效高版本gcc: # gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat
使用下列命令,为CentOS 7.9安装GCC 7. sudo yum install centos-release-scl sudo yum install devtoolset-7 然后通过下列命令启动一个新的 shell,就可以使用GCC 7 scl enable devtoolset-7 bash gcc --version gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1 注意,不能把“scl enable devtoolset-7 bash”加入".bashrc",它会导致命令行出现以下错误。
957.1.3.el7.x86_64 SYSTEM_PROCESSOR x86_64 LIBRARY_ARCHITECTURE CMAKE_VERSION 3.12.2 C_COMPILER /opt/rh/devtoolset -7/root/usr/bin/gcc C_COMPILER_VERSION 7.3.1 CXX_COMPILER /opt/rh/devtoolset-7/root/usr/bin/g++ CXX_COMPILER_VERSION
yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils ## 激活gcc 7.3.1 scl enable devtoolset 若要想一直使用升级后的gcc版本,可配置系统环境变量,使用如下命令: echo \"source /opt/rh/devtoolset-7/enable\" >> /etc/profile source
yum -y install centos-release-scl scl-utils-build yum -y install devtoolset-7-gcc* gcc scl enable devtoolset
build-essential tar curl zip unzip CentOS $ sudo yum install centos-release-scl $ sudo yum install devtoolset -7 $ scl enable devtoolset-7 bash 对于其他的发行版,请确保已安装 g++ 6 或更新的版本。
sudo yum -y install centos-release-scl sudo yum -y install devtoolset-7 scl enable devtoolset-7 bash
devtoolset-2 是 gcc 4.8 devtoolset-3 是 gcc 4.9 devtoolset-4 是 gcc 5.2/5.3 devtoolset-6 是 gcc 6.2/6.3 devtoolset -7 是 gcc 7.2/7.3 CentOS 7 的 centos-sclo-rh/centos-sclo 默认支持 devtoolset-7 及以上,如果想要使用 devtoolset-3 到
devtoolset: shell> gcc -v gcc version 4.8.5 shell> yum install centos-release-scl shell> yum install devtoolset -7 shell> scl enable devtoolset-7 bash shell> gcc -v gcc version 7.3.1 shell> exit shell> gcc -v gcc devtoolset 还有一个冷知识:devtoolset 和 gcc 的版本对应关系如下: devtoolset-3: gcc 4.9 devtoolset-4: gcc 5 devtoolset-6: gcc 6 devtoolset
编译须知 MySQL 8.0 对编译的工具有比较新的版本需求 比如要求 GCC 版本 5.3在 EL6 and EL7 使用 devtoolset-8而非 devtoolset-7 Boost library
CentOS yum install -y centos-release-scl yum install -y devtoolset-7 yum install -y git yum install The Centos Software Collections Repository, devtoolset-7 and Python3 are required to install EOSIO. Do you wish to install and enable this repository, devtoolset-7 and Python3 packages?
openssl openssl-devel ncurses ncurses-devel bison bison-devel jemalloc jemalloc-devel centos-release-scl devtoolset /configure --prefix=/usr --disable-static && make && make install yum install -y centos-release-scl devtoolset -7 # 安装C++高版本 gcc --version scl enable devtoolset-7 bash & echo " 单个 & 符号并列执行 后面的命令"
centos-release-scl yum -y install devtoolset-7-gcc \devtoolset-7-gcc-c++ devtoolset-7-binutilsscl enable devtoolset
yum -y install centos-release-scl scl-utils-build yum -y install devtoolset-7-gcc* gcc scl enable devtoolset
The CXX compiler identification is GNU 7.3.1 -- Check for working C compiler: /opt/rh/devtoolset -7/root/usr/bin/cc -- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- -7/root/usr/bin/c++ -- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -7/root/usr/bin/cc -- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- -7/root/usr/bin/c++ -- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++