centos7中根据gcc编译器安装包升级gcc编译器01
001、系统信息
[root@PC1 home]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.6.1810 (Core) Release: 7.6.1810 Codename: Core
002、当前gcc版本
[root@PC1 home]# gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
003、安装升级依赖
[root@PC1 home]# yum install -y gcc-c++ glibc-devel mpfr-devel libmpc-devel gmp-devel glibc-devel.i686
004、下载安装包
[root@PC1 software]# wget -c https://ftp.gnu.org/gnu/gcc/gcc-13.1.0/gcc-13.1.0.tar.gz --no-check-certificate
005、解压安装包
[root@PC1 software]# tar -xzvf gcc-13.1.0.tar.gz [root@PC1 software]# cd gcc-13.1.0/
006、下载依赖包
[root@PC1 gcc-13.1.0]# ./contrib/download_prerequisites
007、创建build目录
[root@PC1 gcc-13.1.0]# mkdir build [root@PC1 gcc-13.1.0]# cd build/
008、安装到指定目录(说明:若安装到非/usr目录,如安装到/opt/gcc,则在编译完成后需要配置环境变量、建立软连接。)
[root@PC1 build]# ../configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usr
009、编译安装
[root@PC1 build]# make -j4
010、
[root@PC1 build]# make install
011、测试gcc版本
[root@PC1 build]# gcc --version gcc (GCC) 13.1.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
升级成功。
分类:
计算机
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2022-07-17 linux 中shell统计fasta文件中每条染色体上的碱基数目
2022-07-17 linux shell统计 fasta文件中每条染色体上的碱基数
2022-07-17 linux 中删除匹配特定字符的行及其后的若干行
2022-07-17 linux 中 sed命令匹配特定字符之间的数据
2022-07-17 linux 中 sed匹配特定字符并输出其后的若干行
2021-07-17 linux系统中如何删除^M
2021-07-17 linux系统中实现文件指定列的互换