gcc4.8.5升级到gcc4.9.2
第1步:获取repo
[root@localhost SPECS]# wget --no-check-certificate https://copr.fedoraproject.org/coprs/rhscl/devtoolset-3/repo/epel-6/rhscl-devtoolset-3-epel-6.repo -O /etc/yum.repos.d/devtoolset-3.repo
--2021-12-07 20:53:26-- https://copr.fedoraproject.org/coprs/rhscl/devtoolset-3/repo/epel-6/rhscl-devtoolset-3-epel-6.repo
Resolving copr.fedoraproject.org (copr.fedoraproject.org)... 13.212.21.54, 13.233.183.170, 13.250.126.156, ...
Connecting to copr.fedoraproject.org (copr.fedoraproject.org)|13.212.21.54|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://copr.fedorainfracloud.org/coprs/rhscl/devtoolset-3/repo/epel-6/rhscl-devtoolset-3-epel-6.repo [following]
--2021-12-07 20:53:27-- https://copr.fedorainfracloud.org/coprs/rhscl/devtoolset-3/repo/epel-6/rhscl-devtoolset-3-epel-6.repo
Resolving copr.fedorainfracloud.org (copr.fedorainfracloud.org)... 3.225.109.36, 2600:1f18:8ee:ae00:9d1f:4737:93ce:6db
Connecting to copr.fedorainfracloud.org (copr.fedorainfracloud.org)|3.225.109.36|:443... connected.
WARNING: cannot verify copr.fedorainfracloud.org's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
Issued certificate has expired.
HTTP request sent, awaiting response... 200 OK
Length: 376 [text/plain]
Saving to: ‘/etc/yum.repos.d/devtoolset-3.repo’
100%[=============================================>] 376 --.-K/s in 0s
2021-12-07 20:53:28 (49.6 MB/s) - ‘/etc/yum.repos.d/devtoolset-3.repo’ saved [376/376]
第2步:安装devtoolset-3-gcc
[root@localhost SPECS]# yum -y install devtoolset-3-gcc
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.compevo.com
* centos-sclo-rh: mirrors.163.com
* centos-sclo-sclo: mirrors.163.com
* elrepo: mirror.rackspace.com
* extras: repos.lax.quadranet.com
* updates: linux.mirrors.es.net
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-3-gcc.x86_64 0:4.9.2-6.el6 will be installed
--> Processing Dependency: devtoolset-3-binutils >= 2.22.52.0.1 for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
--> Processing Dependency: devtoolset-3-runtime for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
--> Processing Dependency: libgmp.so.3()(64bit) for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
--> Processing Dependency: libmpfr.so.1()(64bit) for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
--> Running transaction check
---> Package devtoolset-3-binutils.x86_64 0:2.24-18.el6 will be installed
---> Package devtoolset-3-gcc.x86_64 0:4.9.2-6.el6 will be installed
--> Processing Dependency: libgmp.so.3()(64bit) for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
--> Processing Dependency: libmpfr.so.1()(64bit) for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
---> Package devtoolset-3-runtime.x86_64 0:3.1-12.el6 will be installed
--> Finished Dependency Resolution
Error: Package: devtoolset-3-gcc-4.9.2-6.el6.x86_64 (copr:copr.fedorainfracloud.org:rhscl:devtoolset-3)
Requires: libmpfr.so.1()(64bit)
Error: Package: devtoolset-3-gcc-4.9.2-6.el6.x86_64 (copr:copr.fedorainfracloud.org:rhscl:devtoolset-3)
Requires: libgmp.so.3()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
若第2步报错,缺少两个安装包,执行第3步:
安装依赖包libmpfr.so.1和libgmp.so.3,下载链接如下:
mpfr:
链接:https://pan.baidu.com/s/1_adAchU_VGmEbSGRoMnhGg
提取码:1234
gmp:
链接:https://pan.baidu.com/s/1nA-LAjArEAGhWSFHTBj0og
提取码:1234
第4步,安装缺省包:
下载后,使用命令安装即可:
yum install compat-libmpfr-2.4.1-1.sl7.x86_64.rpm
yum install compat-libgmp-4.3.1-1.sl7.x86_64.rpm
第5步,再次安装devtoolset-3-gcc
[root@localhost w0412]# yum install devtoolset-3-gcc
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* centos-sclo-rh: mirrors.163.com
* centos-sclo-sclo: mirrors.163.com
* elrepo: mirror.rackspace.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-3-gcc.x86_64 0:4.9.2-6.el6 will be installed
--> Processing Dependency: devtoolset-3-binutils >= 2.22.52.0.1 for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
--> Processing Dependency: devtoolset-3-runtime for package: devtoolset-3-gcc-4.9.2-6.el6.x86_64
--> Running transaction check
---> Package devtoolset-3-binutils.x86_64 0:2.24-18.el6 will be installed
---> Package devtoolset-3-runtime.x86_64 0:3.1-12.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing:
devtoolset-3-gcc
x86_64 4.9.2-6.el6 copr:copr.fedorainfracloud.org:rhscl:devtoolset-3 24 M
Installing for dependencies:
devtoolset-3-binutils
x86_64 2.24-18.el6 copr:copr.fedorainfracloud.org:rhscl:devtoolset-3 5.1 M
devtoolset-3-runtime
x86_64 3.1-12.el6 copr:copr.fedorainfracloud.org:rhscl:devtoolset-3 1.1 M
Transaction Summary
=======================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 30 M
Installed size: 69 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/copr:copr.fedorainfracloud.org:rhscl:devtoolset-3/packages/devtoolset-3-binutils-2.24-18.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 094d442c: NOKEY
Public key for devtoolset-3-binutils-2.24-18.el6.x86_64.rpm is not installed
(1/3): devtoolset-3-binutils-2.24-18.el6.x86_64.rpm | 5.1 MB 00:00:06
(2/3): devtoolset-3-runtime-3.1-12.el6.x86_64.rpm | 1.1 MB 00:00:01
(3/3): devtoolset-3-gcc-4.9.2-6.el6.x86_64.rpm | 24 MB 00:00:13
---------------------------------------------------------------------------------------
Total 2.2 MB/s | 30 MB 00:13
Retrieving key from https://download.copr.fedorainfracloud.org/results/rhscl/devtoolset-3/pubkey.gpg
Importing GPG key 0x094D442C:
Userid : "rhscl_devtoolset-3 (None) <rhscl#devtoolset-3@copr.fedorahosted.org>"
Fingerprint: 143e 840e c0d0 ad21 e646 cdd8 fbce 6502 094d 442c
From : https://download.copr.fedorainfracloud.org/results/rhscl/devtoolset-3/pubkey.gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : devtoolset-3-runtime-3.1-12.el6.x86_64 1/3
Installing : devtoolset-3-binutils-2.24-18.el6.x86_64 2/3
Installing : devtoolset-3-gcc-4.9.2-6.el6.x86_64 3/3
Verifying : devtoolset-3-binutils-2.24-18.el6.x86_64 1/3
Verifying : devtoolset-3-runtime-3.1-12.el6.x86_64 2/3
Verifying : devtoolset-3-gcc-4.9.2-6.el6.x86_64 3/3
Installed:
devtoolset-3-gcc.x86_64 0:4.9.2-6.el6
Dependency Installed:
devtoolset-3-binutils.x86_64 0:2.24-18.el6 devtoolset-3-runtime.x86_64 0:3.1-12.el6
Complete!
第6步,安装devtoolset-3-gcc-c++
[root@localhost w0412]# yum install devtoolset-3-gcc-c++
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* centos-sclo-rh: mirrors.163.com
* centos-sclo-sclo: mirrors.163.com
* elrepo: mirror.rackspace.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-3-gcc-c++.x86_64 0:4.9.2-6.el6 will be installed
--> Processing Dependency: devtoolset-3-libstdc++-devel = 4.9.2-6.el6 for package: devtoolset-3-gcc-c++-4.9.2-6.el6.x86_64
--> Running transaction check
---> Package devtoolset-3-libstdc++-devel.x86_64 0:4.9.2-6.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing:
devtoolset-3-gcc-c++
x86_64 4.9.2-6.el6 copr:copr.fedorainfracloud.org:rhscl:devtoolset-3 8.4 M
Installing for dependencies:
devtoolset-3-libstdc++-devel
x86_64 4.9.2-6.el6 copr:copr.fedorainfracloud.org:rhscl:devtoolset-3 2.0 M
Transaction Summary
=======================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 10 M
Installed size: 32 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): devtoolset-3-libstdc++-devel-4.9.2-6.el6.x86_64.rpm | 2.0 MB 00:00:18
(2/2): devtoolset-3-gcc-c++-4.9.2-6.el6.x86_64.rpm | 8.4 MB 00:00:19
---------------------------------------------------------------------------------------
Total 534 kB/s | 10 MB 00:19
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : devtoolset-3-libstdc++-devel-4.9.2-6.el6.x86_64 1/2
Installing : devtoolset-3-gcc-c++-4.9.2-6.el6.x86_64 2/2
Verifying : devtoolset-3-gcc-c++-4.9.2-6.el6.x86_64 1/2
Verifying : devtoolset-3-libstdc++-devel-4.9.2-6.el6.x86_64 2/2
Installed:
devtoolset-3-gcc-c++.x86_64 0:4.9.2-6.el6
Dependency Installed:
devtoolset-3-libstdc++-devel.x86_64 0:4.9.2-6.el6
Complete!
第7步,安装devtoolset-3-binutils
[root@localhost w0412]# yum install devtoolset-3-binutils
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* centos-sclo-rh: mirrors.163.com
* centos-sclo-sclo: mirrors.163.com
* elrepo: mirror.rackspace.com
* extras: mirrors.163.com
第8步,设置当前gcc版本:
scl enable devtoolset-3 bash
或
source /opt/rh/devtoolset-3/enable
第9步,查看gcc版本
[root@localhost w0412]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-3/root/usr --mandir=/opt/rh/devtoolset-3/root/usr/share/man --infodir=/opt/rh/devtoolset-3/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --with-mpc=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
至此,升级gcc完成。
相关文章:
gcc4.8.5升级到gcc4.9.2
第1步:获取repo [rootlocalhost SPECS]# wget --no-check-certificate https://copr.fedoraproject.org/coprs/rhscl/devtoolset-3/repo/epel-6/rhscl-devtoolset-3-epel-6.repo -O /etc/yum.repos.d/devtoolset-3.repo --2021-12-07 20:53:26-- https://copr.fedo…...
Golang 中的 archive/zip 包详解(三):常用函数
Golang 中的 archive/zip 包用于处理 ZIP 格式的压缩文件,提供了一系列用于创建、读取和解压缩 ZIP 格式文件的函数和类型,使用起来非常方便,本文讲解下常用函数。 zip.OpenReader 定义如下: func OpenReader(name string) (*R…...
微服务架构七种模式
微服务架构七种模式 目录概述需求: 设计思路实现思路分析 参考资料和推荐阅读 Survive by day and develop by night. talk for import biz , show your perfect code,full busy,skip hardness,make a better result,wait for change,challenge Survive.…...
关于CICD流水线的前端项目运行错误,npm项目环境配置时出现报错:Not Found - GET https://registry.npm...
关于CICD流水线的前端项目运行错误,npm项目环境配置时出现报错:Not Found - GET https://registry.npm… 原因应该是某些jar包缓存中没有需要改变镜像将包拉下来 npm config set registry http://registry.npm.taobao.org npm install npm run build...
element-plus的周选择器 一周从周一开始
1、代码 1)、template中 <el-date-picker v-model"value1" type"week" format"[Week] ww" placeholder"巡访周" change"change"value-format"YYYY-MM-DD" /> 2)、方法中 import…...
Android 9.0 pms获取应用列表时过滤掉某些app功能实现
1.前言 在9.0的系统rom定制化开发中,对系统定制的功能也是很多的,在一次产品开发中,要求在第三方app获取应用列表的时候,需要过滤掉某些app,就是不显示在app应用列表中,这就需要在pms查询app列表时过滤掉这些app就可以了,接下来就实现这些功能 2.pms获取应用列表时过滤掉…...
HTML <thead> 标签
实例 带有 thead、tbody 以及 tfoot 元素的 HTML 表格: <table border="1"><thead><tr><th>Month</th><th>Savings</th></tr></thead><tfoot><tr><td>Sum</td><td>$180<…...
谷歌发布Gemini以5倍速击败GPT-4
在Covid疫情爆发之前,谷歌发布了MEENA模型,短时间内成为世界上最好的大型语言模型。谷歌发布的博客和论文非常可爱,因为它特别与OpenAI进行了比较。 相比于现有的最先进生成模型OpenAI GPT-2,MEENA的模型容量增加了1.7倍…...
力扣92. 局部反转链表
92. 反转链表 II 给你单链表的头指针 head 和两个整数 left 和 right ,其中 left < right 。请你反转从位置 left 到位置 right 的链表节点,返回 反转后的链表 。 示例 1: 输入:head [1,2,3,4,5], left 2, right 4 输出&am…...
九、适配器模式
一、什么是适配器模式 适配器模式(Adapter)的定义如下:将一个类的接口转换成客户希望的另外一个接口,使得原本由于接口不兼容而不能一起工作的那些类能一起工作。 适配器模式(Adapter)包含以下主要角色&…...
使用spring自带的发布订阅来实现发布订阅
背景 公司的项目以前代码里面有存在使用spring自带发布订阅的代码,因此稍微学习一下如何使用,并了解一下这种实现方式的优缺点。 优点 实现方便,代码方面基本只需要定义消息体和消费者,适用于小型应用程序。不依赖外部中间件&a…...
Walmart电商促销活动即将开始,如何做促销活动?需要注意什么?
近日,沃尔玛官宣Baby Days优惠活动将于9月1日正式开始!卖家可以把握机会,通过设置促销定价,以最优惠的婴儿相关产品价格吸引消费者,包括汽车座椅、婴儿车、尿布袋、家具、床上用品、消耗品、婴儿服装、孕妇装等。注意本…...
Matlab(画图进阶)
目录 大纲 1.特殊的Plots 1.1 loglog(双对数刻度图) 1.3 plotyy(创建具有两个y轴的图形) 1.4yyaxis(创建具有两个y轴的图) 1.5 bar 3D条形图(bar3) 1.6 pie(饼图) 3D饼图 1.7 polar 2.Stairs And Ste阶梯图 3.Boxplot 箱型图和Error Bar误差条形图 3.1 boxplot 3.2 …...
人生的回忆
回忆是人类宝贵的精神财富,它们像一串串珍珠,串联起我们生活中的每一个片段。 回忆是时间的见证者,它们承载着我们成长、经历、悲欢离合的点点滴滴。 回忆让我们重温过去的欢笑与眼泪,感受那些已经逝去的时光。它们就像一本翻开的…...
Spring之依赖注入源码解析
Spring之依赖注入源码解析 Spring依赖注入的方式 手动注入 在XML中定义Bean时,即为手动注入,因为是程序员手动给某个属性指定了值。 通过set方式进行注入 <bean name"userService" class"com.luban.service.UserService">…...
5G NR:RACH流程-- Msg1之生成PRACH Preamble
随机接入流程中的Msg1,即在PRACH信道上发送random access preamble。涉及到两个问题: 一个是如何产生preamble?一个是如何选择正确的PRACH时频资源发送所选的preamble? 一、PRACH Preamble是什么 PRACH Preamble从数学上来讲是一个长度为…...
高基数类别特征预处理:平均数编码 | 京东云技术团队
一 前言 对于一个类别特征,如果这个特征的取值非常多,则称它为高基数(high-cardinality)类别特征。在深度学习场景中,对于类别特征我们一般采用Embedding的方式,通过预训练或直接训练的方式将类别特征值编…...
高效利用隧道代理实现无阻塞数据采集
在当今信息时代,大量的有价值数据分散于各个网站和平台。然而,许多网站对爬虫程序进行限制或封禁,使得传统方式下的数据采集变得困难重重。本文将向您介绍如何通过使用隧道代理来解决这一问题,并帮助您成为一名高效、顺畅的数据采…...
图论岛屿问题DFS+BFS
leetcode 200 岛屿问题 class Solution {//定义对应的方向boolean [][] visited;int dir[][]{{0,1},{1,0},{-1,0},{0,-1}};public int numIslands(char[][] grid) {//对应的二维数组int count0;visitednew boolean[grid.length][grid[0].length];for (int i 0; i < grid.l…...
Cypress web自动化windows环境npm安装Cypress
前言 web技术已经进化了,web的测试技术最终还是跟上了脚步,新一代的web自动化技术出现了? Cypress可以对在浏览器中运行的任何东西进行快速、简单和可靠的测试。 官方地址https://www.cypress.io/,详细的文档介绍https://docs.cypress.io/g…...
浅谈 React Hooks
React Hooks 是 React 16.8 引入的一组 API,用于在函数组件中使用 state 和其他 React 特性(例如生命周期方法、context 等)。Hooks 通过简洁的函数接口,解决了状态与 UI 的高度解耦,通过函数式编程范式实现更灵活 Rea…...
Vue记事本应用实现教程
文章目录 1. 项目介绍2. 开发环境准备3. 设计应用界面4. 创建Vue实例和数据模型5. 实现记事本功能5.1 添加新记事项5.2 删除记事项5.3 清空所有记事 6. 添加样式7. 功能扩展:显示创建时间8. 功能扩展:记事项搜索9. 完整代码10. Vue知识点解析10.1 数据绑…...
React Native 导航系统实战(React Navigation)
导航系统实战(React Navigation) React Navigation 是 React Native 应用中最常用的导航库之一,它提供了多种导航模式,如堆栈导航(Stack Navigator)、标签导航(Tab Navigator)和抽屉…...
JavaScript 中的 ES|QL:利用 Apache Arrow 工具
作者:来自 Elastic Jeffrey Rengifo 学习如何将 ES|QL 与 JavaScript 的 Apache Arrow 客户端工具一起使用。 想获得 Elastic 认证吗?了解下一期 Elasticsearch Engineer 培训的时间吧! Elasticsearch 拥有众多新功能,助你为自己…...
条件运算符
C中的三目运算符(也称条件运算符,英文:ternary operator)是一种简洁的条件选择语句,语法如下: 条件表达式 ? 表达式1 : 表达式2• 如果“条件表达式”为true,则整个表达式的结果为“表达式1”…...
相机从app启动流程
一、流程框架图 二、具体流程分析 1、得到cameralist和对应的静态信息 目录如下: 重点代码分析: 启动相机前,先要通过getCameraIdList获取camera的个数以及id,然后可以通过getCameraCharacteristics获取对应id camera的capabilities(静态信息)进行一些openCamera前的…...
JUC笔记(上)-复习 涉及死锁 volatile synchronized CAS 原子操作
一、上下文切换 即使单核CPU也可以进行多线程执行代码,CPU会给每个线程分配CPU时间片来实现这个机制。时间片非常短,所以CPU会不断地切换线程执行,从而让我们感觉多个线程是同时执行的。时间片一般是十几毫秒(ms)。通过时间片分配算法执行。…...
【开发技术】.Net使用FFmpeg视频特定帧上绘制内容
目录 一、目的 二、解决方案 2.1 什么是FFmpeg 2.2 FFmpeg主要功能 2.3 使用Xabe.FFmpeg调用FFmpeg功能 2.4 使用 FFmpeg 的 drawbox 滤镜来绘制 ROI 三、总结 一、目的 当前市场上有很多目标检测智能识别的相关算法,当前调用一个医疗行业的AI识别算法后返回…...
有限自动机到正规文法转换器v1.0
1 项目简介 这是一个功能强大的有限自动机(Finite Automaton, FA)到正规文法(Regular Grammar)转换器,它配备了一个直观且完整的图形用户界面,使用户能够轻松地进行操作和观察。该程序基于编译原理中的经典…...
在Ubuntu24上采用Wine打开SourceInsight
1. 安装wine sudo apt install wine 2. 安装32位库支持,SourceInsight是32位程序 sudo dpkg --add-architecture i386 sudo apt update sudo apt install wine32:i386 3. 验证安装 wine --version 4. 安装必要的字体和库(解决显示问题) sudo apt install fonts-wqy…...
