![ubuntu 更新时出错](https://linux22.com/image/1148319/ubuntu%20%E6%9B%B4%E6%96%B0%E6%97%B6%E5%87%BA%E9%94%99.png)
当我尝试更新时出现此错误。我正在使用 Ubuntu 17.04。
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
apache2-bin
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
apache2-bin
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
2 not fully installed or removed.
Need to get 949 kB of archives.
After this operation, 3,781 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu zesty/main amd64 apache2-bin amd64 2.4.25-3ubuntu2 [949 kB]
Fetched 949 kB in 12s (76.5 kB/s)
(Reading database ... 212651 files and directories currently installed.)
Preparing to unpack .../apache2-bin_2.4.25-3ubuntu2_amd64.deb ...
Unpacking apache2-bin (2.4.25-3ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.25-3ubuntu2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/apache2/modules/httpd.exp', which is also in package apache2.2-bin 2.2.22-1ubuntu1.11
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.25-3ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
该错误表明您正在尝试安装,apache2-bin
但它试图覆盖属于已安装包的文件apache2.2-bin
。
显然您不能同时安装 apache2 和 apache2.2,因为它们使用相同的文件系统命名空间。