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

推荐订阅源

U
Unit 42
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News | PayPal Newsroom
Application and Cybersecurity Blog
Application and Cybersecurity Blog
O
OpenAI News
S
Security @ Cisco Blogs
宝玉的分享
宝玉的分享
Hacker News: Ask HN
Hacker News: Ask HN
T
Troy Hunt's Blog
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
TaoSecurity Blog
TaoSecurity Blog
Help Net Security
Help Net Security
Latest news
Latest news
NISL@THU
NISL@THU
S
Security Affairs
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 聂微东
AI
AI
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
小众软件
小众软件
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
AWS News Blog
AWS News Blog
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
I
InfoQ
Schneier on Security
Schneier on Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
The Exploit Database - CXSecurity.com
IT之家
IT之家
T
Threatpost
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
腾讯CDC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
N
News and Events Feed by Topic
L
LINUX DO - 最新话题
F
Full Disclosure
大猫的无限游戏
大猫的无限游戏
H
Heimdal Security Blog
S
SegmentFault 最新的问题

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.