2

If I type sudo apt-get install php5-intl I get the following error:

php5-intl : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4) but 5.5.13+dfsg-2+deb.sury.org~precise+1 is installed

How do I fix it?

On apt-cache policy php5-intl php5-common I have:

php5-intl:
  Instalado: (nenhum)
  Candidato: 5.5.9+dfsg-1ubuntu4
  Tabela de versão:
     5.5.9+dfsg-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
php5-common:
  Instalado: 5.5.13+dfsg-2+deb.sury.org~precise+1
  Candidato: 5.5.13+dfsg-2+deb.sury.org~precise+1
  Tabela de versão:
 *** 5.5.13+dfsg-2+deb.sury.org~precise+1 0
        100 /var/lib/dpkg/status
     5.5.9+dfsg-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

As @AndreaCorbellini suggested, dpkg -l | grep deb.sury.org,

ii  apache2                                               2.4.9-1+deb.sury.org~precise+1                      amd64        Apache HTTP Server
ii  apache2-bin                                           2.4.9-1+deb.sury.org~precise+1                      amd64        Apache HTTP Server (binary files and modules)
ii  apache2-data                                          2.4.9-1+deb.sury.org~precise+1                      all          Apache HTTP Server (common files)
ii  apache2-mpm-prefork                                   2.4.9-1+deb.sury.org~precise+1                      amd64        transitional prefork MPM package for apache2
ii  apache2-utils                                         2.4.9-1+deb.sury.org~precise+1                      amd64        Apache HTTP Server (utility programs for web servers)
rc  libapache2-mod-php5                                   5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapr1:amd64                                         1.5.1-2+deb.sury.org~precise+1                      amd64        Apache Portable Runtime Library
ii  libjson-c2:amd64                                      0.11-4+deb.sury.org~precise+1                       amd64        JSON manipulation library - shared library
ii  libjson-c2:i386                                       0.11-4+deb.sury.org~precise+1                       i386         JSON manipulation library - shared library
ii  libjson0:amd64                                        0.11-4+deb.sury.org~precise+1                       amd64        JSON manipulation library (transitional package)
rc  php5-cli                                              5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        command-line interpreter for the php5 scripting language
rc  php5-curl                                             5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        CURL module for php5
rc  php5-gd                                               5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        GD module for php5
ii  php5-json                                             1.3.5-1+deb.sury.org~precise+1                      amd64        JSON module for php5
rc  php5-mysql                                            5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        MySQL module for php5
rc  php5-pgsql                                            5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        PostgreSQL module for php5
rc  php5-readline                                         5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        Readline module for php5
rc  php5-tidy                                             5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        tidy module for php5
rc  php5-xsl                                              5.5.13+dfsg-2+deb.sury.org~precise+1                amd64        XSL module for php5

As @AB suggested, lets see find /etc/apt/ -name "*.list" -exec bash -c 'printf "\n%s\n%s\n%s\n" "========" "$1" "========"; cat "$1"' _ {} \;

========
/etc/apt/sources.list.d/google-talkplugin.list
========
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb http://dl.google.com/linux/talkplugin/deb/ stable main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/dropbox.list
========
# deb http://linux.dropbox.com/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/pinta-maintainers-pinta-daily-trusty.list
========

========
/etc/apt/sources.list.d/precise-partner.list
========
deb http://archive.canonical.com/ubuntu trusty partner #Added by software-center

========
/etc/apt/sources.list.d/libreoffice-ppa-precise.list
========
# deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main # desabilitado na atualização para trusty
# deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/webupd8team-sublime-text-2-precise.list
========
deb http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu trusty main # desabilitado na atualização para trusty
# deb-src http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/opera.list
========
# This file makes sure that Opera Browser is kept up-to-date
# as part of regular system upgrades

deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)

# The line above will make sure you get all final public releases.
# Uncomment the following line if you want to get alpha and beta
# releases, too.

# deb http://deb.opera.com/opera-beta/ stable non-free #Opera Browser (beta releases)

========
/etc/apt/sources.list.d/ubuntugis-ubuntugis-unstable-precise.list
========
# deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main # desabilitado na atualização para trusty
# deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/webupd8team-y-ppa-manager-precise.list
========
# deb http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu trusty main # desabilitado na atualização para trusty
# deb-src http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/keithw-mosh-precise.list
========
# deb http://ppa.launchpad.net/keithw/mosh/ubuntu trusty main # desabilitado na atualização para trusty
# deb-src http://ppa.launchpad.net/keithw/mosh/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/webupd8team-sublime-text-2-trusty.list
========
# deb-src http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu trusty main

========
/etc/apt/sources.list.d/pinta-maintainers-pinta-stable-trusty.list
========
deb http://ppa.launchpad.net/pinta-maintainers/pinta-stable/ubuntu trusty main
# deb-src http://ppa.launchpad.net/pinta-maintainers/pinta-stable/ubuntu trusty main

========
/etc/apt/sources.list.d/ondrej-php5-precise.list
========
# deb http://ppa.launchpad.net/ondrej/php5/ubuntu trusty main # desabilitado na atualização para trusty
# deb-src http://ppa.launchpad.net/ondrej/php5/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/pgdg.list
========
# deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main # desabilitado na atualização para trusty

========
/etc/apt/sources.list.d/juan457-zorba-precise.list
========
# deb http://ppa.launchpad.net/juan457/zorba/ubuntu trusty main # desabilitado na atualização para trusty
# deb-src http://ppa.launchpad.net/juan457/zorba/ubuntu trusty main # desabilitado na atualização para trusty

========
/etc/apt/sources.list
========
deb http://archive.ubuntu.com/ubuntu trusty universe main restricted multiverse
  • You have installed php5-common 5.5.13 manually, and APT refuses to downgrade packages explicitly. You should either downgrade php5-common manually, or find a suitable version for php5-intl. – Andrea Corbellini Aug 15 '15 at 16:01
  • @AndreaCorbellini, thanks... I think the answer below shows a "how to downgrade" for php5-common, and I used it... But I lost my PHP (!), perhaps I need to downgrade all PHP packages, how to do it? – Peter Krauss Aug 15 '15 at 17:35
  • Peter, I'd start from listing all the foreign php packages: dpkg -l | grep deb.sury.org. – Andrea Corbellini Aug 15 '15 at 18:06
  • @AndreaCorbellini thanks (!), I edited the question, now I show my dpkg. – Peter Krauss Aug 15 '15 at 18:40
  • The packages that start with ii are those that you should downgrade. Use apt-cache policy to know the version from the Ubuntu repositories. And, next time, use ppa-purge when removing a PPA ;-) – Andrea Corbellini Aug 15 '15 at 18:43
4

Force the installation of version 5.5.9+dfsg-1ubuntu4

sudo apt-get install php5-common=5.5.9+dfsg-1ubuntu4

Version 5.5.9+dfsg-1ubuntu4 can't be installed in the normal way, because your installed version has a higher version number.


After reading your comments and your updated question, your system is pretty shot up. Why do you use PPAs or install deb files if you do not know how to handle it?

I suspect you've used PPAs from here. Therefore

  1. Re-add the PPAs

  2. Upgrade your system. We need a defined state

    sudo apt-get update
    sudo apt-get dist-upgrade
    
  3. Decide whether you want to keep the PPAs

    • If your answer is yes, stop here

    • If your answer is no, read on

      Install a little helper

      sudo apt-get install ppa-purge
      

      Purge the PPAs, eg ppa:ondrej/apache2

      sudo ppa-purge ppa:ondrej/apache2
      

      Repeat the previous step for all PPAs that you do not want to keep

  • Thanks, it works (!)... but now I have no PHP, bash: /usr/bin/php: file not found – Peter Krauss Aug 15 '15 at 17:30
  • How to get back my PHP!!?? – Peter Krauss Aug 15 '15 at 17:32
  • sudo apt-get install php5-cli – A.B. Aug 15 '15 at 17:40
  • And the binary is /usr/bin/php5 – A.B. Aug 15 '15 at 17:41
  • Ok, using sudo apt-get install php5-cli, them php5-cli returns (!), but with no package (need install php5-xsl, etc.)... Now run scripts with php5-intl (!)... BUT: I lost all my localhost ... (see the question I edited with dpkg -l) – Peter Krauss Aug 15 '15 at 19:02
0

When you upgrade, Ubuntu will disable your PPA's, in an attempt to avoid conflicts of software that is no longer supported.

You quite possibly upgraded from a previous version and need to re-enable the PPA.

You can simply check a box in the software updater (settingsrepositoriesother software), or you could edit the source file(s) manually and uncomment the disabled PPA to enable it again by:

sudo nano /etc/apt/sources.list

As long as the PPA supports your new version, it will probably update after you reload packages (sudo apt-get update).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.