最新の g++ をインストールする方法を備忘録として残しておきます。 0 flex をインストール $ sudo apt install flex 1 ソースをダウンロード $ cd ~/Downloads $ git clone https://github.com/gcc-mirror/gcc.git 2 依存ライブラリのダウンロード $ cd gcc $ ./contrib/download_prerequisites 3 環境変数を unset $ unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE…