1 thing i dislike about hugo

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.)

  1. 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.)
  2. Double-click the file to extract the contents. The hugo file is what you’ll want to move to the bin folder, but don’t do it yet.
  3. Open the Mac Systems Preferences app.
  4. Click the Security and Privacy settings icon. If necessary, click on its General tab.
  5. Click the lock icon and enter the password. This unlocks the “Allow apps downloaded from” area for a few minutes.
  6. Move the hugo file to the bin folder. (If you’re not doing this for the first time, go ahead and replace the hugo file that’s already there.)
  7. Open your preferred Mac terminal app and enter hugo version. You’ll get a warning about the file. Click Cancel.
  8. Back in the Security and Privacy settings window, approve the use of the hugo file by clicking Allow Anyway.
  9. 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.)

9 Likes