尝试升级到PHP 5.4

时间:2014-09-30 16:48:03

标签: php python ubuntu apt-get

我已经尝试将我的Ubuntu服务器的PHP版本升级到5.4了很长一段时间。

首先我要跑:

sudo add-apt-repository ppa:ondrej/php5-oldstable

但我明白了:

sudo: add-apt-repository: command not found

所以我运行这个:

sudo apt-get install python-software-properties

然后我明白了:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 python-software-properties : Depends: python-apt (>= 0.6.20ubuntu16) but it is not going to be installed
                              Depends: unattended-upgrades but it is not going to be installed
E: Broken packages

所以,我正在尝试安装python-apt:

sudo apt-get install python-apt

还有一条错误信息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
python-apt : Depends: libapt-inst-libc6.10-6-1.1
          Depends: libapt-pkg-libc6.10-6-4.8
E: Broken packages

所以,我尝试安装libapt-inst-libc6.10-6-1.1:

sudo apt-get install libapt-inst-libc6.10-6-1.1

我得到了:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'apt-utils' instead of 'libapt-inst-libc6.10-6-1.1'
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:
  apt-utils : Depends: libapt-pkg-libc6.10-6-4.8
E: Broken packages

它一直在继续。我不知道该怎么办。请帮忙!

1 个答案:

答案 0 :(得分:0)

这是我的2美分。要修复部分依赖项,请阅读本文中的第一个答案:https://askubuntu.com/questions/263378/how-to-fix-dependencies-broken-packages  我确信这是你问题的一部分。第1步:http://tecadmin.net/install-apache2-mysql-php5-on-ubuntu-systems/文章将指导您完成Ubuntu上的PHP 5.4安装,看起来您已经看过了。我希望我能帮助一点点。请告诉我们,

干杯,

RonAtomics

P.S。我知道它没有意义,但是,你试过再次尝试所有的命令吗?...... CentOS很傻,Ubuntu可能也是如此,我想我会提到它。

P.S.S。这是针对python的Ubuntu 12.04和14.04的不同PPA。 http://ubuntuhandbook.org/index.php/2014/05/install-python-3-3-5-or-3-4-via-ppa-in-ubuntu-14-04-12-04/