This guide provides step-by-step instructions to install GCC, Python, and Node.js on macOS, Windows, and Linux.
This guide provides step-by-step instructions to install the GNU Compiler Collection (GCC) on macOS, Windows, and Linux.
- macOS (tested on macOS Ventura and later)
Xcode
Command Line Tools (forclang
and related tools)
-
Install
Xcode
Command Line Tools (if not already installed):xcode-select --install
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install GCC via Homebrew:
brew install gcc
-
Verify Installation:
gcc --version
Windows 10 or later
Administrator privileges
-
Install MinGW-w64 (Minimalist GNU for Windows):
- Download the installer from MinGW-w64.
- Run the installer and select the following options:
- Architecture:
x86_64
(for 64-bit) ori686
(for 32-bit) - Threads:
posix
- Exception:
seh
(for 64-bit) ordwarf
(for 32-bit) - Installation folder: Choose a directory (e.g.,
C:\mingw-w64
)
- Architecture:
-
Add MinGW-w64 to System PATH:
- Open the Start menu, search for "Environment Variables," and click "Edit the system environment variables."
- In the System Properties window, click "Environment Variables."
- Under "System variables," find the
Path
variable, click "Edit," and add thebin
directory of your MinGW-w64 installation (e.g.,C:\mingw-w64\bin
).
-
Verify Installation:
gcc --version
- A Linux distribution (e.g., Ubuntu, Fedora, Debian)
sudo
privileges
-
Update Package List:
sudo apt update
-
Install GCC:
-
For Debian/Ubuntu-based systems:
sudo apt install build-essential
-
For Fedora:
sudo dnf install gcc
-
For Arch Linux:
sudo pacman -S gcc
-
-
Verify Installation:
gcc --version
- macOS: If
gcc
points toclang
, usegcc-<version>
(e.g.,gcc-12
) or create an alias. - Windows: Ensure the MinGW-w64
bin
directory is correctly added to the system PATH. - Linux: If
gcc
is not found, ensure the package manager is updated and try reinstalling.
This guide provides step-by-step instructions to install Python on macOS, Windows, and Linux.
-
Install Python via Homebrew:
brew install python
-
Verify Installation:
python3 --version
-
Download Python:
- Visit the official Python website: python.org.
- Download the latest version of Python for Windows.
-
Run the Installer:
- Check the box to Add Python to PATH during installation.
- Click "Install Now."
-
Verify Installation:
python --version
-
Install Python:
-
For Debian/Ubuntu-based systems:
sudo apt install python3
-
For Fedora:
sudo dnf install python3
-
For Arch Linux:
sudo pacman -S python
-
-
Verify Installation:
python3 --version
This guide provides step-by-step instructions to install Node.js on macOS, Windows, and Linux.
-
Install Node.js via Homebrew:
brew install node
-
Verify Installation:
node --version npm --version
-
Download Node.js:
- Visit the official Node.js website: nodejs.org.
- Download the LTS version for Windows.
-
Run the Installer:
- Follow the installation wizard and accept the default settings.
-
Verify Installation:
node --version npm --version
-
Install Node.js:
-
For Debian/Ubuntu-based systems:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt install -y nodejs
-
For Fedora:
sudo dnf install nodejs
-
For Arch Linux:
sudo pacman -S nodejs npm
-
-
Verify Installation:
node --version npm --version
- GCC: Ensure the correct version is installed and added to the system PATH.
- Python: If
python
doesn't work, trypython3
or check your PATH configuration. - Node.js: If
npm
is not found, reinstall Node.js or update your PATH.
This guide is licensed under the MIT License. You are free to use, modify, and distribute this guide. No monetary compensation is required.