当前位置: 首页 > news >正文

C++远端开发环境安装(centos7)

使用VMWare安装centos7

启用网卡设备

修改文件/etc/sysconfig/network-scripts/ifcfg-ens33中的ONBOOT=yes

重启网络服务 systemctl restart network

配置yum仓库

直接将如下内容覆盖原有的/etc/yum.repos.d/CentOS-Base.repo文件

清理yum缓存

yum clean all

刷新yum

yum update

注意:本机是X86_64并且是centos7环境

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#[base]
name=CentOS-7 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/http://mirrors.aliyuncs.com/centos/7/os/x86_64/http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#released updates 
[updates]
name=CentOS-7 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/updates/x86_64/http://mirrors.aliyuncs.com/centos/7/updates/x86_64/http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/extras/x86_64/http://mirrors.aliyuncs.com/centos/7/extras/x86_64/http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/centosplus/x86_64/http://mirrors.aliyuncs.com/centos/7/centosplus/x86_64/http://mirrors.cloud.aliyuncs.com/centos/7/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users
[contrib]
name=CentOS-7 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/contrib/x86_64/http://mirrors.aliyuncs.com/centos/7/contrib/x86_64/http://mirrors.cloud.aliyuncs.com/centos/7/contrib/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

安装wget

yum install -y wget

安装gcc

新建一个目录并且进入该目录

mkdir ~/software;cd ~/software

下载gcc安装包

wget https://ftp.gnu.org/gnu/gcc/gcc-10.5.0/gcc-10.5.0.tar.gz

解压安装包

tar -xvf gcc-10.5.0.tar.gz

进入解压后的文件夹

cd gcc-10.5.0

下载gcc 依赖项

yum install make bzip2 curl file gcc gcc-c++ glibc-devel glibc-static libmpc-devel mpfr-devel libstdc++-devel libatomic libatomic-devel perl-ExtUtils-MakeMaker perl-Test-Simple perl-File-Temp perl-Time-HiRes perl-Path-Tiny perl-Getopt-Long perl-File-Copy-Recursive perl-Module-BuildTiny texinfo bison flex libmpc libmpfr libgmp zlib-devel

下载前置依赖项

./contrib/download_prerequisites

配置gcc

./configure --prefix=/usr/local --enable-bootstrap --enable-languages=c,c++,fortran --disable-multilib --enable-shared --with-system-zlib --without-included-gettext

编译gcc

make -j$(nproc)

注意:若编译过程中出现其他报错,一般是依赖项错误,可以自行根据错误信息检索解决方法

安装gcc

http://www.lryc.cn/news/448210.html

相关文章:

  • LaTeX 编辑器-TeXstudio
  • [深度学习]循环神经网络
  • 景联文科技精准数据标注:优化智能标注平台,打造智能未来
  • 商场促销——策略模式
  • 万字长文,AIGC算法工程师的面试秘籍,推荐收藏!
  • 一些超好用的 GitHub 插件和技巧
  • 记Flink SQL 将数据写入 MySQL时的一个优化策略
  • QT-自定义信号和槽对象树图形化开发计算器
  • C# 字符串(String)的应用说明一
  • Redis缓存淘汰算法详解
  • Sklearn 与 TensorFlow 机器学习实用指南
  • RabbitMQ 界面管理说明
  • 设备管理与点巡检系统
  • 计算机网络的整体认识---网络协议,网络传输过程
  • Battery management system (BMS)
  • 和GPT讨论ZNS的问题(无修改)
  • 6.8方框滤波
  • 携手SelectDB,观测云实现性能与成本的双重飞跃
  • Redis 五大基本数据类型及其应用场景进阶(缓存预热、雪崩 、穿透 、击穿)
  • 如何在ChatGPT的帮助下,使用“逻辑回归”技巧完成论文写作?
  • MySQL 临时表
  • 个人文章汇总(算法原理算法题)
  • 基于Hive和Hadoop的图书分析系统
  • 阿里rtc云端录制TypeScript版NODE运行
  • Web后端开发原理!!!什么是自动配置???什么是起动依赖???
  • 2-105 基于matlab的GA-WNN预测算法
  • GPT-o1模型实测:论文选题没思路,ChatGPT-o1带你飞!
  • OpenCV视频I/O(2)视频采集类VideoCapture之检索视频流的各种属性函数get()的使用
  • 基于SpringBoot的学生宿舍管理系统【附源码】
  • 【开源免费】基于SpringBoot+Vue.JS新闻推荐系统(JAVA毕业设计)