文章目錄
- 前提
- 一、安裝 g++
- 1.1 安裝
- 1.2 驗證
前提
安裝 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.