0

I've been trying to upgrade my Ubuntu server's PHP version to 5.4 for quite a while now.

First I'm trying to run:

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

But I get this:

sudo: add-apt-repository: command not found

So I run this:

sudo apt-get install python-software-properties

Then I get this:

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

So, I'm trying to install python-apt:

sudo apt-get install python-apt

And yet another error message:

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

So, I try to install libapt-inst-libc6.10-6-1.1:

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

And I get:

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

And it goes on and on and on. I don't know what to do. Please help!

user1878980
  • 515
  • 2
  • 8
  • 21
  • I'm starting to suspect that I did something wrong when I installed apt-get. Is there a way to completely uninstall it and try again from scratch? What do you suggest I do? – user1878980 Sep 30 '14 at 16:49
  • I would try to install the `sudo apt-get install software-properties-common` – Ohgodwhy Sep 30 '14 at 16:54
  • I tried it but I get this error right afterwards: E: Unable to locate package software-properties-common – user1878980 Sep 30 '14 at 17:37

1 Answers1

0

here is my 2 cents. To fix some of your dependancies, read the first answer in this article: https://askubuntu.com/questions/263378/how-to-fix-dependencies-broken-packages I'm sure this is a part of your issue. Step 1 in this:http://tecadmin.net/install-apache2-mysql-php5-on-ubuntu-systems/ article will guide you through a PHP 5.4 install on Ubuntu, which it looks like you already have looked at. I hope I have helped even a little. Let us know,

Cheers,

RonAtomics

P.S. I know it doesnt make sense but, have you tried to su- then try all of your commands again?...CentOS is goofy like that, Ubuntu might be too so I figured I'd mention it.

P.S.S. Here is a differnet PPA for Ubuntu 12.04 and 14.04 regarding python. http://ubuntuhandbook.org/index.php/2014/05/install-python-3-3-5-or-3-4-via-ppa-in-ubuntu-14-04-12-04/

Community
  • 1
  • 1
  • I tried everything in the article you linked to but nothing helped. I still have the same issue. Is it possible to uninstall apt-get and try this again from scratch? Or what can I do to move forward? – user1878980 Sep 30 '14 at 18:14
  • AFAIK, you cannot just uninstall apt-get, you can reinstall Ubuntu from an ISO to possibly fix some apt-get errors(Probably NOT what you want to do). Everything I've looked at/experienced tells me to check your repos. Unfortunately I dont think I can help any further. Check your repos,https://help.ubuntu.com/community/Repositories/CommandLine – RonAtomics Sep 30 '14 at 18:25
  • Have you tried sudo apt-get -f install libapt-pkg-libc6.10-6-4.8 THEN sudo apt-get -f install libapt-inst-libc6.10-6-1.1 THEN sudo apt-get -f install python-apt The order does/can matter. – RonAtomics Sep 30 '14 at 18:30
  • It tried it now, it says that libapt-pkg-libc6.10-6-4.8 is not available but is referred to by another package. This may mean that the package is missing, has been obsolete, or is only available from another source. – user1878980 Sep 30 '14 at 18:49
  • It seems like the packages I'm trying to install is not available in the package list... I have no idea why. – user1878980 Sep 30 '14 at 19:55
  • I solved it by adding the PHP 5.4 PPA repository manually in the sources.list file. Thanks for all the help! – user1878980 Sep 30 '14 at 20:38