---
title: "Hugo 最新版搭建"
url: https://geminixiang.com/posts/hugo-latest-setup/
description: "apt 裝的 Hugo 卡在 0.68？在 Ubuntu 20.04 移除舊版，透過 GitHub API 下載最新 .deb 安裝 Hugo（2022-06 時為 v0.101.0）。"
published: 2022-08-14
category: "DevOps"
tags: ["hugo"]
---

# Hugo 最新版搭建

> 前言:
> 2020 年碩士期間搭建了 Hexo 來記錄所學，當時對於 npm 家族比較習慣，近期開始接觸 golang，順勢也把荒廢的 blog 搬移過來，希望接下來能夠整理一些近期 kafka、AWS EMR、BigQuery 所學的知識...

# Hugo 安裝最新版本

> 如果你也像我一樣，apt install hugo 都卡在 0.68.0 左右的版本的話，可以參考
> 這邊是使用 ubuntu 20.04，要記得挑符合自己 cpu 版本的

## 1. 移除 apt 所安裝的 hugo

```bash
sudo apt update
sudo apt install curl wget
sudo apt remove hugo
```

## 2. 下載最新 hugo.deb

```bash
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest \
 | grep  browser_download_url \
 | grep Linux-64bit.deb \
 | grep -v extended \
 | cut -d '"' -f 4 \
 | wget -i -
```

## 3. 安裝他，改成你下載的 filename

```bash
sudo dpkg -i hugo*_Linux-64bit.deb
```

## 4. 完工

```bash
hugo version

---

## About the author

**Ying Xiang Zhao** (geminixiang) — DevOps Engineer, Taipei, Taiwan.

Ying Xiang Zhao（geminixiang）是住在台北的 DevOps 工程師，工作橫跨雲原生基礎設施、CI/CD、ML 模型部署與全端開發。這個部落格記錄 infra、資安與 AI coding agent 的實戰筆記；作品包含開源專案 mikan（把 AI coding agent 帶進 Slack / Telegram / Discord）與 tiny-agent（用四種語言實作的極簡 coding agent），瀏覽器內的影片編輯器 Studio，並經營旅遊分帳工具 SentriPay。

**Open to work** — DevOps Engineer / Platform Engineer / Site Reliability Engineer / AI Infrastructure Engineer · Taipei, Taiwan / Remote. Résumé: https://geminixiang.com/about/ (JSON: https://geminixiang.com/resume.json)

Topics: DevOps, Cloud Native, Kubernetes, Docker, Terraform, Google Cloud, CI/CD, Security, AI coding agents, ML model deployment, TypeScript, Python

Projects:
- [mikan](https://github.com/geminixiang/mikan) — Self-hosted AI coding agent for Slack, Telegram, Discord and GitHub with per-conversation sandboxes
- [tiny-agent](https://github.com/geminixiang/tiny-agent) — Minimal AI coding agents in TypeScript, Go, Python and Rust, plus a book on how they work
- [SentriPay](https://sentripay.com) — Travel expense splitter with multi-currency conversion and shareable, live-synced trip ledgers
- [Studio](https://studio.geminixiang.com) — Browser-based video editor built on WebCodecs

[About](https://geminixiang.com/about/) · [Résumé](https://geminixiang.com/about/) · [LinkedIn](https://linkedin.com/in/geminixiang/) · [GitHub](https://github.com/geminixiang) · [Twitter](https://x.com/geminixiang)
