phpをphp5に更新しようとしていますが、次のエラーが発生します。
root@Ansible-VirtualBox:~# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libbsd0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libedit2 libgd3 libvpx1
php5-cli php5-common php5-gd php5-json
Suggested packages:
apache2-doc apache2-suexec-pristine apache2-suexec-custom libgd-tools
php-pear php5-user-cache
Recommended packages:
php5-readline
The following packages will be REMOVED:
apache2-mpm-prefork apache2.2-bin apache2.2-common
The following NEW packages will be installed:
apache2-bin apache2-data libgd3 libvpx1 php5-json
The following packages will be upgraded:
apache2 apache2-utils libedit2 php5-cli php5-common php5-gd
6 upgraded, 5 newly installed, 3 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 0 B/5,489 kB of archives.
After this operation, 2,659 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 177484 files and directories currently installed.)
Unpacking apache2-bin (from .../apache2-bin_2.4.17-2+deb.sury.org~precise+1_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.17-2+deb.sury.org~precise+1_i386.deb (--unpack):
trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2.2-common 2.2.22-1ubuntu1.10
dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.17-2+deb.sury.org~precise+1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
以前にインストールされたバージョンとパッケージを削除しようとすると、次のエラーが発生します。
root@Ansible-VirtualBox:~# apt-get remove apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libapache2-mod-php5 : Depends: apache2-api-20120211
Depends: apache2 (>= 2.4)
Depends: php5-common (= 5.5.30+dfsg-1+deb.sury.org~precise+1) but 5.3.10-1ubuntu3.21 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@Ansible-VirtualBox:~# apt-get remove apache2.2-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
apache2-mpm-prefork : Depends: apache2.2-bin (= 2.2.22-1ubuntu1.10) but it is not going to be installed
apache2.2-common : Depends: apache2.2-bin (= 2.2.22-1ubuntu1.10) but it is not going to be installed
libapache2-mod-php5 : Depends: apache2-api-20120211
Depends: apache2 (>= 2.4)
Depends: php5-common (= 5.5.30+dfsg-1+deb.sury.org~precise+1) but 5.3.10-1ubuntu3.21 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@Ansible-VirtualBox:~# apt-get remove apache2-
apache2-mpm-prefork apache2-utils
root@Ansible-VirtualBox:~# apt-get remove apache2
apache2 apache2.2-bin apache2.2-common apache2-mpm-prefork apache2-utils
root@Ansible-VirtualBox:~# apt-get remove apache2.2-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
apache2 : Depends: apache2.2-common (= 2.2.22-1ubuntu1.10) but it is not going to be installed
apache2-mpm-prefork : Depends: apache2.2-common (= 2.2.22-1ubuntu1.10) but it is not going to be installed
libapache2-mod-php5 : Depends: apache2-api-20120211
Depends: apache2 (>= 2.4)
Depends: php5-common (= 5.5.30+dfsg-1+deb.sury.org~precise+1) but 5.3.10-1ubuntu3.21 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
ベストアンサー1
理由を見つけました。
dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.17-2+deb.sury.org-precise+1_i386.deb (--unpack)
trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2.2-common 2.2.22-1ubuntu1.10
あなたは明らかにサム(!!)apache
バージョンが同時に(または「2つだけ」インストールされています)努力する3番目の追加):v2.2.22、v2.4.17、v2.8。これはまったくお勧めできません。エラーやサーバー障害が発生しやすいです。!
厳密に遵守する必要があります一つ3つのバージョンでapache
は、削除残りのすべてのApacheバージョン(例:Ubuntu Precise Pangolinの2.2.22と2.4.17):
$ sudo apt-get remove <name of previous package(s)>
(入力apa
してからTabキーを使って正しいパッケージ名を選択してください)
あなたのシステムはこれらの奇妙なバージョンのために複雑になりましたapache
。