以libpcre2-dev为例:
看起来是包太新了,导致连依赖都跟不上更新的速度
然后一顿翻找,找到了一个解决方法:这里
简而言之,就是用 aptitude 代替 apt 解决依赖
aptitude install libpcre2-dev
然后问你保持原状选择 n
,降级方案选择 y
armbian:nginx-1.25.4:# aptitude install libpcre2-dev
The following NEW packages will be installed:
libpcre2-16-0{a} libpcre2-32-0{a} libpcre2-dev{b} libpcre2-posix3{a}
0 packages upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,143 kB of archives. After unpacking 3,590 kB will be used.
The following packages have unmet dependencies:
libpcre2-dev : Depends: libpcre2-8-0 (= 10.42-1) but 10.42-4 is installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libpcre2-dev [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libpcre2-8-0 [10.42-4 (now) -> 10.42-1 (stable)]
Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
libpcre2-8-0
The following NEW packages will be installed:
libpcre2-16-0{a} libpcre2-32-0{a} libpcre2-dev libpcre2-posix3{a}
0 packages upgraded, 4 newly installed, 1 downgraded, 0 to remove and 1 not upgraded.
Need to get 1,373 kB of archives. After unpacking 3,590 kB will be used.
Do you want to continue? [Y/n/?] y
按照这样即可。很简单吧
本文由 zlh 创作,采用 知识共享署名4.0 国际许可协议进行许可。
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。