What is a Package Manager?
A package manager handles installing, updating, configuring, and uninstalling software on a computer. It deals with packages which include metadata, and in detail, the metadata includes the software’s name, source, dependencies, and so on.
The dependency information becomes convenient as the package manager will install it automatically if missing. For example, wget requires libidn2 and firstname.lastname@example.org, and package manager will install it. In addition, package manager will store dependency information and will even prevent software mismatches.
As written in the introduction, a developer can performs these actions from the GUI but action such as installing, updating, configuring, and uninstalling becomes tedious when clicking the screen. With a package manager, these actions can finish in a single line. For example, I can install PostgreSQL version 9.4 with brew install email@example.com, uninstall with brew uninstall firstname.lastname@example.org, and then install version 12 with brew install postgresql@12.
Python and Node.js versions change as well so use a package manager!
Install Chocolatey on Windows
Installing Chocolatey on Windows requires the use of PowerShell. You can install Chocolatey on a non-administrative shell, but I recommend to use the administrative shell as it cuts down a lot of steps. Their website lists the requirements and explains the installation in depth. The following describes the steps installing Chocolatey on Windows 10 using an administrative PowerShell, but these could change in the future. Go to their website to checkout the latest installation instruction.
Firstly, run PowerShell as administrator by searching for PowerShell from search and right clicking on the result. An administrative shell will open in the system32 folder.
Secondly, run the command Get-ExecutionPolicy. If the shell responds with All-Signed move on to the next step, but if it responds with Restricted execute Set-ExecutionPolicy AllSigned.
Thirdly, copy and paste the command on the website to install Chocolatey. At this time, I executed Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’)).
Lastly, execute choco and check if PowerShell successfully installed Chocolatey.
Install brew on macOS
Copy the command on their website and paste that into Terminal. You DO NOT need to run it with sudo. The command could change from the one in the screenshot, so grab the latest one from the website.
The command will ask for your password and also explain what it will do. Press the return key and go grab a cup of coffee because this usually takes more than a couple of minutes.
After the installation has finished, execute brew and it should respond.