ubuntu 安装 g++


前提

安装 tflite_support 报错

error: subprocess-exited-with-error
RuntimeError: Unsupported compiler -- at least C++11 support is needed!

在这里插入图片描述

一、安装 g++

1.1 安装

# 安装编译工具链(如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 的核心功能

# 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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值