iT邦幫忙

0

ubuntu 16 php5.5無法安裝

hsiang11 3 月前5152 瀏覽

sudo apt-get install -y php5.5
安裝出現錯誤
升級系統之後php版本太高程式出錯誤
所以要降到5.5,但是無法安裝
有人有ubuntu 16安裝php5.5的經驗嗎?

ubuntu@ip-172-32-0-93:~$ sudo apt-get install -y php5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php5.5-libsodium' for regex 'php5.5'
Note, selecting 'php5.5-tideways' for regex 'php5.5'
Note, selecting 'php5.5-xhprof' for regex 'php5.5'
Note, selecting 'php5.5-gmagick' for regex 'php5.5'
Note, selecting 'php5.5-smbclient' for regex 'php5.5'
Note, selecting 'php5.5-mongo' for regex 'php5.5'
Note, selecting 'php5.5-geoip' for regex 'php5.5'
Note, selecting 'php5.5-uuid' for regex 'php5.5'
Note, selecting 'php5.5-oauth' for regex 'php5.5'
Note, selecting 'php5.5-radius' for regex 'php5.5'
Note, selecting 'php5.5-rrd' for regex 'php5.5'
Note, selecting 'php5.5-memcache' for regex 'php5.5'
Note, selecting 'php5.5-uploadprogress' for regex 'php5.5'
Note, selecting 'php5.5-xcache' for regex 'php5.5'
Note, selecting 'php5.5-yac' for regex 'php5.5'
Note, selecting 'php5.5-yaml' for regex 'php5.5'
Note, selecting 'php5.5-zmq' for regex 'php5.5'
Note, selecting 'php5.5-raphf' for regex 'php5.5'
Note, selecting 'php5.5-propro' for regex 'php5.5'
Note, selecting 'php5.5-amqp' for regex 'php5.5'
Note, selecting 'php-radius' instead of 'php5.5-radius'
Note, selecting 'php-uploadprogress' instead of 'php5.5-uploadprogress'
Note, selecting 'php-yaml' instead of 'php5.5-yaml'
Note, selecting 'php-amqp' instead of 'php5.5-amqp'
Note, selecting 'php-rrd' instead of 'php5.5-rrd'
Note, selecting 'php-uuid' instead of 'php5.5-uuid'
Note, selecting 'php-memcache' instead of 'php5.5-memcache'
Note, selecting 'php-gmagick' instead of 'php5.5-gmagick'
Note, selecting 'php-smbclient' instead of 'php5.5-smbclient'
Note, selecting 'php-zmq' instead of 'php5.5-zmq'
Note, selecting 'php-geoip' instead of 'php5.5-geoip'
Note, selecting 'php-tideways' instead of 'php5.5-tideways'
Note, selecting 'php-yac' instead of 'php5.5-yac'
Note, selecting 'php-libsodium' instead of 'php5.5-libsodium'
Note, selecting 'php-oauth' instead of 'php5.5-oauth'
Note, selecting 'php-propro' instead of 'php5.5-propro'
Note, selecting 'php-raphf' instead of 'php5.5-raphf'
Note, selecting 'php-xcache' instead of 'php5.5-xcache'
Note, selecting 'php-mongo' instead of 'php5.5-mongo'
Note, selecting 'php-xhprof' instead of 'php5.5-xhprof'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php-yac : Conflicts: php-xcache but 3.2.0-2+deb.sury.org~xenial+1 is to be installed
E: Unable to correct problems, you have held broken packages.

2 個回答

2
bizpro
iT邦大師 1 級 ‧ 3 月前
最佳解答

問題: 升級系統之後php版本太高程式出錯誤,所以要降到5.5, 但套件不相容, 導致
you have requested an impossible situation.

解法:

  1. 修改原始程式去除PHP 5.5的依賴: 這是必要的, 長痛不如短痛.
  2. 編譯PHP 5.5為獨立PHP系統: 這是解決套件不相容的方法, 但PHP 5.5已停產了.
  3. 不升級Ubuntu: 如果解法1和2都不適合, 這是唯一的方法.
weiclin iT邦高手 7 級 ‧ 3 月前 檢舉

長痛不如短痛 +1

0
joshhu
iT邦見習生 0 級 ‧ 3 月前

我是用docker解決的。

我要發表回答

立即登入回答