正在尝试升级到PHP5.4

正在尝试升级到PHP5.4,php,python,ubuntu,apt-get,Php,Python,Ubuntu,Apt Get,很长一段时间以来,我一直在尝试将我的Ubuntu服务器的PHP版本升级到5.4 首先,我尝试运行: sudo add-apt-repository ppa:ondrej/php5-oldstable 但我明白了: sudo: add-apt-repository: command not found Reading package lists... Done Building dependency tree Reading state information... Done S

很长一段时间以来,我一直在尝试将我的Ubuntu服务器的PHP版本升级到5.4

首先,我尝试运行:

sudo add-apt-repository ppa:ondrej/php5-oldstable
但我明白了:

sudo: add-apt-repository: command not found
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
所以我运行这个:

sudo apt-get install python-software-properties
然后我得到这个:

sudo: add-apt-repository: command not found
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

它一直持续下去。我不知道该怎么办。请帮忙

这是我的2美分。要解决一些依赖性问题,请阅读本文的第一个答案: 我相信这是你问题的一部分。第1步:本文将指导您完成Ubuntu上的PHP5.4安装,看起来您已经看过了。我希望我帮了一点忙。让我们知道,

干杯

日射学

顺便说一句,我知道这没有什么意义,但是,你有没有尝试过su-然后再尝试一下你所有的命令?…CentOS就是这样的傻瓜,Ubuntu可能太傻了,所以我想我应该提一下

这里是关于python的Ubuntu 12.04和14.04的不同PPA。

我开始怀疑我安装apt get时做错了什么。有没有办法完全卸载它,然后从头开始重试?你建议我怎么做?我会尝试安装
sudo apt get install software properties common
我尝试过,但后来就出现了这个错误:E:找不到包软件属性common我尝试了你链接到的文章中的所有内容,但没有任何帮助。我仍然有同样的问题。是否可以卸载apt get并从头开始重试?或者我该怎么做才能继续前进呢?好吧,你不能只卸载apt-get,你可以从ISO重新安装Ubuntu来修复一些apt-get错误(可能不是你想做的)。我所看到/经历的一切都告诉我要检查你的回购协议。不幸的是,我想我再也帮不了你了。检查您的repos,您是否尝试过sudo-apt-get-f安装libapt-pkg-libc6.10-6-4.8然后sudo-apt-get-f安装libapt-inst-libc6.10-6-1.1然后sudo-apt-get-f安装python-apt命令是否重要。它现在尝试了,它说libapt-pkg-libc6.10-6-4.8不可用,但被另一个包引用。这可能意味着该软件包已丢失、已过时或只能从其他来源获得。我尝试安装的软件包似乎在软件包列表中不可用。。。我不知道为什么。