我的问题是我想在 ubuntu 上安装 OwnCloud,长话短说,我不得不将 PHP 从 v8 降级到 v7.2,我发现了问题
老实说,我真的不太清楚问题所在,但是当我运行升级命令时,例如,我收到此错误
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpcre2-dev : Depends: libpcre2-posix2 (= 10.39-2+ubuntu21.10.1+deb.sury.org+1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Run Code Online (Sandbox Code Playgroud)
即使当我运行 apt --fix-broken install 命令时,我也会收到以下消息:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libpcre2-posix3
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libpcre2-posix2
The following NEW packages will be installed:
libpcre2-posix2
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
12 not fully installed or removed.
Need to get 0 B/8,300 B of archives.
After this operation, 33.8 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 251030 files and directories currently installed.)
Preparing to unpack .../libpcre2-posix2_10.39-2+ubuntu21.10.1+deb.sury.org+1_amd64.deb ...
Unpacking libpcre2-posix2:amd64 (10.39-2+ubuntu21.10.1+deb.sury.org+1) ...
dpkg: error processing archive /var/cache/apt/archives/libpcre2-posix2_10.39-2+ubuntu21.10.1+deb.sury.
org+1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libpcre2-posix.so.3', which is also in package libpcre
2-posix3:amd64 10.37-0ubuntu2
Errors were encountered while processing:
/var/cache/apt/archives/libpcre2-posix2_10.39-2+ubuntu21.10.1+deb.sury.org+1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
我想解决这个问题,但最重要的是,我想了解更多有关 Linux 的信息,因此非常欢迎任何解释。谢谢你!
小智 21
我遇到了相反的情况(posix3 而不是 posix2):
The following package was automatically installed and is no longer required:
libpcre2-posix2
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
libpcre2-posix3
The following NEW packages will be installed:
libpcre2-posix3
Run Code Online (Sandbox Code Playgroud)
这对我有用。(对你来说就是libpcre2-posix3)
sudo dpkg --purge libpcre2-posix2
sudo apt --fix-broken install
Run Code Online (Sandbox Code Playgroud)
之后一切都好。
希望这可以帮助。
| 归档时间: |
|
| 查看次数: |
5797 次 |
| 最近记录: |