Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install g++ on Conda under Linux?

I have tried

conda install -c conda-forge gcc

but it only installed gcc. I also need g++.

like image 281
Eduardo Reis Avatar asked Sep 02 '25 07:09

Eduardo Reis


1 Answers

Narrow Solution

It ships under the package name gxx:

conda install -c conda-forge gxx

Recommended Specification

Generally, I prefer using the Conda Forge compilers package or one of its subpackages (e.g., cxx-compiler), as this specification works across platforms. For example, cxx-compiler will install g++ on Linux, clang++ on OSX, and vc on Windows:

conda install -c conda-forge cxx-compiler
like image 167
merv Avatar answered Sep 05 '25 02:09

merv