惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
W
WeLiveSecurity
I
InfoQ
L
Lohrmann on Cybersecurity
Simon Willison's Weblog
Simon Willison's Weblog
腾讯CDC
S
Schneier on Security
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
Attack and Defense Labs
Attack and Defense Labs
I
Intezer
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
S
Securelist
T
Tailwind CSS Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
T
Tor Project blog
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
Apple Machine Learning Research
Apple Machine Learning Research
V
Visual Studio Blog
Know Your Adversary
Know Your Adversary
T
The Blog of Author Tim Ferriss
N
News and Events Feed by Topic
小众软件
小众软件
G
Google Developers Blog
F
Full Disclosure
O
OpenAI News
The Last Watchdog
The Last Watchdog
G
GRAHAM CLULEY
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
Jina AI
Jina AI
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
Y
Y Combinator Blog
N
News and Events Feed by Topic
K
Kaspersky official blog

Bin Wang - My Personal Blog

Travel Back to China: 2026 Edition | Bin Wang TCode: An AI Coding Agent Leverages Neovim and Tmux | Bin Wang My 2025 in Review | Bin Wang Music Video Generation with AI | Bin Wang Home Network Setup with OpenWrt and VLANs | Bin Wang A Rust CLI Program, Use It with LLM and Convert It to Web UI | Bin Wang My First Rust Project | Bin Wang Download Message Images from Seesaw | Bin Wang My Workflow to Review Articles with LLMs | Bin Wang Why Consensus Shortcuts Fail in Distributed Systems | Bin Wang Improve Books Section of My Blog | Bin Wang Use OpenAPI Instead of MCP for LLM Tools | Bin Wang Travel Back To China: 2025 Edition | Bin Wang Replace A Dead Node in My High Availability Cluster | Bin Wang A 2-Year Reflection for 2023 and 2024 | Bin Wang Jepsen Test on Patroni: A PostgreSQL High Availability Solution | Bin Wang SBT Task to Build Frontend Components | Bin Wang My MacOS Essentials | Bin Wang Source Code of RSS Brain is Available | Bin Wang
Fix ZFS Linux Kernel Dependency on Arch Linux | Bin Wang
2025-12-17 · via Bin Wang - My Personal Blog

Table of Contents

  1. Problem
  2. Manual Force Downgrade Packages
  3. Use Local Pacman Repo

LinuxZFSdependency

Update 2025-12-20: add section about using local repo.

Problem

When updating an Arch Linux system, if you have some third-party repos added, the packages in them sometimes depend on an older package that’s not available in the official repos anymore. In such cases, pacman cannot upgrade the system unless you exclude the impacted package.

ZFS is an example of this. Since Arch Linux doesn’t ship ZFS packages in official repos, I added a third-party one archzfs. However, ZFS support doesn’t always catch up with the newest kernel. When this happens, the upgrade will break.

There is another repo that’s supposed to host the matching kernel version. It can be added by the following section in /etc/pacman.conf:

[zfs-linux]
Server = http://kernels.archzfs.com/$repo/

However, it also often lags behind. See this Github issue for the most recent example.

Manual Force Downgrade Packages

Arch Linux has archives for old packages. There are command line tools like downgrade to install the packages from archives instead of from the repo. So we can install the desired version of dependencies with downgrade.

When installing a specific version with downgrade, if it breaks other packages, it will refuse to continue installing. You can resolve it by installing multiple packages at once in the dependency chain, for example:

sudo downgrade linux linux-headers

It will ask you version for each package.

However, it will fail to install since it will break the dependency of the current installed zfs-linux package. Even if you add zfs-linux to the downgrade list, it doesn’t check for the version that will be installed.

One way to resolve it is by removing zfs-linux first, then run the command above to install desired version of linux packages, then install the newer of version of zfs-linux back.

When you run pacman -Syu again, you will still get an error like this:

error: failed to prepare transaction (could not satisfy dependencies)
:: installing linux (6.18.1.arch1-2) breaks dependency 'linux=6.17.9.arch1-1' required by zfs-linux

But it’s safe to ignore the kernel related packages now by using the --ignore flag:

sudo pacman -Syu --ignore linux --ignore linux-headers

Important: you may have noticed that we include the package linux-headers in the commands above, even though pacman doesn’t complain if we don’t do that. That’s because in Arch Linux, linux-headers doesn’t depend on a specific version of linux. However, if you have a version mismatch, it may break some dkms modules. So it’s better to always keep them in sync.

Use Local Pacman Repo

The approach described above can resolve the dependency conflicts, however, it always feels very risky to manually remove an important package like zfs-linux even it’s just temporarily. If we want to rely on pacman to resolve the dependencies without error, we can use local pacman repo. Here is how to do that:

First, still run the downgrade command above to select desired version of packages:

sudo downgrade linux linux-headers

It will download the packages to /var/cache/pacman/pkg even if it will not install the packages because of failed dependency check.

Then we can copy the downloaded packages to another folder that will be used as a local pacman repo:

sudo mkdir /var/pacman-local-repo
sudo cp /var/cache/pacman/pkg/<packages> /var/pacman-local-repo

Then make it a valid repo:

cd /var/pacman-local-repo
sudo repo-add local-repo.db.tar.gz *.pkg.tar.zst

At last add the local repo to /etc/pacman.conf:

[local-repo]
SigLevel = Optional TrustAll
Server = file:///var/pacman-local-repo

Then just run pacman -Syu and it will find the matching dependency versions in local-repo.

Remember to comment out the section after the upgrade is done, since you don’t want the old packages always in the config.