Fix Missing sha512sum and sha256sum on macOS Sierra using HomeBrew and CoreUtils
Fix Missing sha512sum and sha256sum on macOS Sierra using HomeBrew and CoreUtils

Some people may have run into this error on macOS (previously OSX) where they require the use of sha512sum or sha256sum packages which all Linux distributions have. macOS is a BSD based operating system so it should have easier ways of installing missing packages like you can do on any other Linux distribution but I think due to the way macOS has matured and since the introduction of the App Store, Apple has made it all that much more difficult to install packages that are not in their App Store. Welcome to Homebrew, the savior for those of you requiring all sorts of packages you can get on other Linux / Unix distributions but not on macOS.

First you need to install Homebrew. Homebrew is the most popular package manager for MacOS and Homebrew Cask extends Homebrew with support for quickly installing Mac applications like Google Chrome, VLC, and more. But it includes so many other packages too. Homebrew is designed for installing UNIX tools and other open-source applications on macOS. It will quickly download and install them, compiling them from source.

So Let Us Install Homebrew and Homebrew Cask

First, you’ll need the command-line tools for Xcode installed. You certainly don’t need the full XCode which is a whopping 5Gb in size. So open terminal on macOS and run the following.

xcode-select --install

Now install Homebrew, once again from the terminal run the following.

ruby -e "$(curl -fsSL"

This script informs you what it will do and will ask you to provide your password to install it. It takes some time to complete so be patient but once done you can confirm it installed correctly and whether you are ready to BREW by running the following command in the terminal.

brew doctor

This will give you a message (if all went well) “Your system is ready to Brew

Now install Homebrew Cask by running the following command in your terminal. Cask allows you to search through available packages.

brew install caskroom/cask/brew-cask

Once Cask is installed you can search for packages available by running a command like

brew cask search packagename

Now Back to the original Topic of this Post Fixing the Missing sha512 and sha256 packages

Let’s install CoreUtils using Homebrew, run the following from terminal to install the CoreUtils package.

brew install coreutils

Once it completes, simply link the binaries as follows so that macOS can see them.

sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
sudo ln -s /usr/local/bin/gsha512sum /usr/local/bin/sha512sum

That’s it …. problem fixed.

2 thoughts on “Homebrew | Fix Missing sha512sum and sha256sum on macOS Sierra

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.