ubuntu 安装 g++

文章目录

  • 前提
  • [一、安装 g++](#一、安装 g++)
    • [1.1 安装](#1.1 安装)
    • [1.2 验证](#1.2 验证)

前提

安装 tflite_support 报错

bash 复制代码
error: subprocess-exited-with-error
RuntimeError: Unsupported compiler -- at least C++11 support is needed!

一、安装 g++

1.1 安装

bash 复制代码
# 安装编译工具链(如g++)和依赖库
sudo apt-get update
sudo apt-get install -y build-essential libstdc++6 g++-9  # 安装g++9或更高版本
  • gcc(GNU C编译器):用于编译C语言程序。
  • g++(GNU C++编译器):用于编译C++语言程序。
  • make:用于构建程序,通过读取Makefile文件来自动化编译过程。

1.2 验证

安装 g++ 会自动安装 gcc,因为 g++ 依赖于 gcc 的核心功能

bash 复制代码
# g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 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.

# gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 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.
相关推荐
Tender_光1 小时前
iptables实验
运维·服务器
szxinmai主板定制专家1 小时前
【飞腾AI加固服务器】全国产化飞腾+昇腾310+PCIe Switch的AI大模型服务器解决方案
运维·服务器·arm开发·人工智能·fpga开发
点击查询1 小时前
怎么把自己电脑设置成服务器?
运维·服务器
阿里云大数据AI技术2 小时前
ES Serverless 8.17王牌发布:向量检索「火力全开」,智能扩缩「秒级响应」!
大数据·运维·serverless
yzx9910132 小时前
Linux 系统中的算法技巧与性能优化
linux·算法·性能优化
fengyehongWorld2 小时前
Linux Docker的简介
linux·docker
wanhengidc2 小时前
服务器中日志分析的作用都有哪些
运维·服务器
upp2 小时前
【bug】Error: /undefinedfilename in (/tmp/ocrmypdf.io.9xfn1e3b/origin.pdf)
ubuntu·pdf·bug·ghostscript
Mikhail_G2 小时前
Python应用变量与数据类型
大数据·运维·开发语言·python·数据分析
曹瑞曹瑞2 小时前
VMware导入vmdk文件
linux·运维·服务器