How to Install Hugo on Alpine Linux

Installing Hugo on Alpine Linux is a straightforward process. Follow these steps to get Hugo up and running on your system:

1. Install Required Dependencies

First, make sure you have the necessary dependencies installed:

sudo apk add curl git

2. Download Hugo

Next, download the Hugo binary. Replace HUGO_VERSION with the desired version number:

HUGO_VERSION=0.143.1
TEMP=$(mktemp -d)
wget -O "${TEMP}/hugo.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"

3. Extract and Install Hugo

Extract the downloaded tarball and move the Hugo binary to a directory in your PATH:

sudo tar -xf "${TEMP}/hugo.tar.gz" -C /usr/bin
sudo apk add --update libc6-compat libstdc++

4. Verify Installation

Finally, verify that Hugo is installed correctly by checking its version:

hugo version

Conclusion

By following these steps, you should have Hugo installed on your Alpine Linux system. If you encounter any issues or need further assistance, refer to the official Hugo installation guide.

Happy site building with Hugo!


Related Posts