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…...

装饰模式(Decorator Pattern)重构java邮件发奖系统实战
前言 现在我们有个如下的需求,设计一个邮件发奖的小系统, 需求 1.数据验证 → 2. 敏感信息加密 → 3. 日志记录 → 4. 实际发送邮件 装饰器模式(Decorator Pattern)允许向一个现有的对象添加新的功能,同时又不改变其…...

微软PowerBI考试 PL300-选择 Power BI 模型框架【附练习数据】
微软PowerBI考试 PL300-选择 Power BI 模型框架 20 多年来,Microsoft 持续对企业商业智能 (BI) 进行大量投资。 Azure Analysis Services (AAS) 和 SQL Server Analysis Services (SSAS) 基于无数企业使用的成熟的 BI 数据建模技术。 同样的技术也是 Power BI 数据…...

解决Ubuntu22.04 VMware失败的问题 ubuntu入门之二十八
现象1 打开VMware失败 Ubuntu升级之后打开VMware上报需要安装vmmon和vmnet,点击确认后如下提示 最终上报fail 解决方法 内核升级导致,需要在新内核下重新下载编译安装 查看版本 $ vmware -v VMware Workstation 17.5.1 build-23298084$ lsb_release…...
leetcodeSQL解题:3564. 季节性销售分析
leetcodeSQL解题:3564. 季节性销售分析 题目: 表:sales ---------------------- | Column Name | Type | ---------------------- | sale_id | int | | product_id | int | | sale_date | date | | quantity | int | | price | decimal | -…...
Caliper 配置文件解析:config.yaml
Caliper 是一个区块链性能基准测试工具,用于评估不同区块链平台的性能。下面我将详细解释你提供的 fisco-bcos.json 文件结构,并说明它与 config.yaml 文件的关系。 fisco-bcos.json 文件解析 这个文件是针对 FISCO-BCOS 区块链网络的 Caliper 配置文件,主要包含以下几个部…...

LLMs 系列实操科普(1)
写在前面: 本期内容我们继续 Andrej Karpathy 的《How I use LLMs》讲座内容,原视频时长 ~130 分钟,以实操演示主流的一些 LLMs 的使用,由于涉及到实操,实际上并不适合以文字整理,但还是决定尽量整理一份笔…...
BLEU评分:机器翻译质量评估的黄金标准
BLEU评分:机器翻译质量评估的黄金标准 1. 引言 在自然语言处理(NLP)领域,衡量一个机器翻译模型的性能至关重要。BLEU (Bilingual Evaluation Understudy) 作为一种自动化评估指标,自2002年由IBM的Kishore Papineni等人提出以来,…...
Vue 模板语句的数据来源
🧩 Vue 模板语句的数据来源:全方位解析 Vue 模板(<template> 部分)中的表达式、指令绑定(如 v-bind, v-on)和插值({{ }})都在一个特定的作用域内求值。这个作用域由当前 组件…...

C++_哈希表
本篇文章是对C学习的哈希表部分的学习分享 相信一定会对你有所帮助~ 那咱们废话不多说,直接开始吧! 一、基础概念 1. 哈希核心思想: 哈希函数的作用:通过此函数建立一个Key与存储位置之间的映射关系。理想目标:实现…...
使用 uv 工具快速部署并管理 vLLM 推理环境
uv:现代 Python 项目管理的高效助手 uv:Rust 驱动的 Python 包管理新时代 在部署大语言模型(LLM)推理服务时,vLLM 是一个备受关注的方案,具备高吞吐、低延迟和对 OpenAI API 的良好兼容性。为了提高部署效…...