Re #1, you always have to open the Mac’s Security and Privacy settings and give the hugo
binary permission to run. The following instructions assume you have a folder (which we’ll call bin
) in your system PATH. (Note: Regarding the system PATH, you may want to consult this article.)
- Go to Hugo’s releases page and download the file with Hugo software for your Mac. For v.0.102.x and up, it’s a universal binary that will install on either Intel or Apple Silicon CPUs. (I highly recommend you always get the extended version.)
- Double-click the file to extract the contents. The
hugo
file is what you’ll want to move to thebin
folder, but don’t do it yet. - Open the Mac Systems Preferences app.
- Click the Security and Privacy settings icon. If necessary, click on its General tab.
- Click the lock icon and enter the password. This unlocks the “Allow apps downloaded from” area for a few minutes.
- Move the
hugo
file to thebin
folder. (If you’re not doing this for the first time, go ahead and replace thehugo
file that’s already there.) - Open your preferred Mac terminal app and enter
hugo version
. You’ll get a warning about the file. Click Cancel. - Back in the Security and Privacy settings window, approve the use of the
hugo
file by clicking Allow Anyway. - Repeat step 7. This time, you’ll get a minor warning but, this time, click Open to bypass it. In the terminal app window, the
hugo version
command will be allowed to run and you should see something like the following (this is for v.0.102.3):
hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended darwin/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
You’re done.
This may sound like a lot, but after you’ve done it a few times it’ll be second nature. (On the other hand: if you don’t want to try this, you can always stick with package managers like Homebrew.)