Problème de configuration avec PHP 5.4

Bonjour tout le monde,

je suis sous debian sid et j’ai un soucis depuis la sortie de php5.4 sauf que il ne peux pas configurer les paquets…

[quote]Les paquets partiellement installés suivants seront configurés :
libapache2-mod-php5 php-pear php5 php5-cgi php5-cli php5-common php5-dev php5-mysql
[/quote]

résultat…

Merci d’avance pour ceux qui auront une solution à me proposer :slightly_smiling:

Salut,

Est ce une install récente ?

~ ±1 an

Dé-installé proprement et réinstall ?

Donnes les retours (complets) suivants.

Rappel si besoin: -s = simulation.

[quote]aptitude -s remove --purge php5
Les paquets suivants seront ENLEVÉS :
php5
Les paquets partiellement installés suivants seront configurés :
libapache2-mod-php5 php-pear php5-cgi php5-cli php5-common php5-dev php5-mysql
0 paquets mis à jour, 0 nouvellement installés, 1 à enlever et 0 non mis à jour.
Il est nécessaire de télécharger 0 o d’archives. Après dépaquetage, 21,5 ko seront libérés.
Charger/installer/enlever des paquets.
[/quote]

[quote]aptitude search ~c
c at-spi2-core - Assistive Technology Service Provider Interface (dbus core)
c capplets-data - configuration applets for GNOME - data files
c cups-driver-gutenprint - paquet de transition pour le pilote d’imprimante gutenprint
c firebird2.5-common - common files for firebird 2.5 servers and clients
c gir1.0-gtk-2.0 - GObject introspection data for the GTK+ library
c gnome-netstatus-applet - Network status applet for GNOME
c libaccess-bridge-java-jni - accessibilité Java pour GNOME (points d’entrée jni)
c libantlr-java-gcj - language tool for constructing recognizers, compilers etc
c libatspi2.0-0 - Assistive Technology Service Provider Interface - shared library
c libav-tools - Multimedia player, server, encoder and transcoder
c libavcodec52 - Libav codec library
c libavdevice53 - FFmpeg device handling library.
c libavfilter2 - FFmpeg filter library.
c libavformat52 - Libav file format library
c libavutil-extra-51 - bibliothèque d’utilitaires de Libav
c libavutil49 - ffmpeg utility library
c libavutil50 - Libav utility library
c libboost-date-time1.42.0 - set of date-time libraries based on generic programming concepts
c libboost-date-time1.46.1 - set of date-time libraries based on generic programming concepts
c libboost-iostreams1.46.1 - bibliothèque Boost.Iostreams
c libboost-program-options1.46.1 - program options library for C++
c libboost-python1.42.0 - Boost.Python Library
c libboost-python1.46.1 - Boost.Python Library
c libboost-serialization1.46.1 - serialization library for C++
c libboost-thread1.42.0 - portable C++ multi-threading
c libboost-thread1.46.1 - portable C++ multi-threading
c libbrasero-media0 - CD/DVD burning library for GNOME - runtime
c libbrlapi0.5 - braille display access via BRLTTY - shared library
c libcamel-1.2-23 - Evolution MIME message handling library
c libcamel1.2-19 - Evolution MIME message handling library
c libchamplain-0.10-0 - C library providing ClutterActor to display maps
c libchamplain-0.4-0 - C library providing ClutterActor to display maps
c libchamplain-gtk-0.10-0 - Gtk+ widget to display maps
c libchamplain-gtk-0.4-0 - A Gtk+ widget to display maps
c libcheese-gtk18 - A tool to take pictures and videos from your webcam - widgets
c libcryptui0 - the UI library for DBUS functions exported by seahorse
c libcupsdriver1 - système commun d’impression sous UNIX - bibliothèque pour pilotes
c libebackend1.2-0 - Utility library for evolution data servers
c libebook1.2-10 - Client library for evolution address books
c libecal1.2-7 - Client library for evolution calendars
c libecal1.2-8 - Client library for evolution calendars
c libedata-book-1.2-9 - Backend library for evolution address books
c libedata-book1.2-2 - Backend library for evolution address books
c libedata-book1.2-8 - Backend library for evolution address books
c libedata-cal-1.2-11 - Backend library for evolution calendars
c libedata-cal1.2-10 - Backend library for evolution calendars
c libedata-cal1.2-7 - Backend library for evolution calendars
c libedataserver1.2-14 - Utility library for evolution data servers
c libedataserverui-3.0-0 - GUI utility library for evolution data servers
c libedataserverui1.2-11 - GUI utility library for evolution data servers
c libedataserverui1.2-8 - GUI utility library for evolution data servers
c libeggdbus-1-0 - D-Bus bindings for GObject
c libegroupwise1.2-13 - Client library for accessing groupwise POA through SOAP interface
c libepc-1.0-2 - Easy Publish and Consume library - shared libraries
c libepc-ui-1.0-2 - Easy Publish and Consume library - shared widget libraries
c libevince3 - Document (PostScript, PDF) rendering library
c libfbclient2 - Firebird client library
c libfolks-telepathy24 - Telepathy backend for libfolks
c libfolks24 - library to aggregates people into metacontacts
c libgadu3 - gestion du protocole Gadu-Gadu - bibliothèque d’exécution
c libgalago3 - Galago presence library
c libgck0 - Glib wrapper library for PKCS#11 - runtime
c libgcr-3-0 - Library for Crypto UI related task - runtime
c libgcr0 - Library for Crypto UI related task - runtime
c libgd2-noxpm - bibliothèque graphique GD version 2 (sans gestion de XPM)
c libgdata-google1.2-1 - Client library for accessing Google POA through SOAP interface
c libgdata1.2-1 - Client library for accessing Google POA through SOAP interface
c libgdata11 - Library for accessing GData webservices - shared libraries
c libgdata7 - Library for accessing GData webservices - shared libraries
c libgirepository1.0-0 - Library for handling GObject introspection data (runtime library)
c libglew1.6 - OpenGL Extension Wrangler - runtime environment
c libgmime-2.4-2 - bibliothèque de création et d’analyse de message MIME - exécution
c libgmp3c2 - Multiprecision arithmetic library
c libgnome-desktop-3-0 - Utility library for loading .desktop files - runtime files
c libgnome-media0 - runtime libraries for the GNOME media utilities
c libgnome2.24-cil - points d’entrée CLI pour GNOME 2.24
c libgnomekbd4 - GNOME library to manage keyboard configuration - shared library
c libgp11-0 - Glib wrapper library for PKCS#11 - runtime
c libgs8 - The Ghostscript PostScript/PDF interpreter Library
c libgssdp-1.0-2 - GObject-based library for SSDP
c libgtkhtml-editor-3.14-0 - HTML rendering/editing library - editor widget
c libgtkhtml-editor0 - HTML rendering/editing library - editor widget
c libgtkimageview0 - image viewer widget for GTK+
c libgtksourceview2.0-0 - Bibliothèques partagées pour le widget de coloration syntaxique GTK+
c libgucharmap7 - Unicode browser widget library (shared library for GTK+ 2)
c libgupnp-1.0-3 - GObject-based library for UPnP
c libgupnp-igd-1.0-3 - library to handle UPnP IGD port mapping
c libgweather1 - GWeather shared library
c libhal-storage1 - Couche d’abstraction matérielle : bibliothèque partagée pour périphériq
c libhal1 - Couche d’abstraction matérielle : bibliothèque partagée
c libid3tag0 - Bibliothèque de lecture d’étiquettes (« tag ») ID3 du projet MAD
c libimobiledevice1 - Library for communicating with the iPhone and iPod Touch
c libjim0debian1 - small-footprint implementation of Tcl - shared library
c libkdb5-5 - MIT Kerberos runtime libraries - Kerberos database
c libmagick++3 - object-oriented C++ interface to ImageMagick
c libmagickcore3 - low-level image manipulation library
c libmagickwand3 - image manipulation library
c libmatroska4 - extensible open standard audio/video container format (shared library)
c libmetacity-private0 - library for the Metacity window manager
c libmono0 - Mono JIT library
c libmozjs6d - Mozilla SpiderMonkey JavaScript library
c libmozjs7d - Mozilla SpiderMonkey JavaScript library
c libmozjs8d - Mozilla SpiderMonkey JavaScript library
c libmozjs9d - Mozilla SpiderMonkey JavaScript library
c libmtp8 - Media Transfer Protocol (MTP) library
c libnautilus-extension1 - libraries for nautilus components - runtime version
c libnice0 - ICE library (shared library)
c libnl1 - Bibliothèque pour traiter les sockets netlink
c libnl3 - library for dealing with netlink sockets
c libnm-glib2 - network management framework (GLib shared library)
c libnm-util1 - network management framework (shared library)
c libnotify1 - sends desktop notifications to a notification daemon
c libntfs-3g75 - ntfs-3g filesystem in userspace (FUSE) library
c libofx4 - library to support the Open Financial Exchange format
c liboobs-1-4 - GObject based interface to system-tools-backends - shared library
c libosp5 - Runtime library for OpenJade group’s SP suite
c libpanel-applet2-0 - library for GNOME Panel applets
c libpango1.0-common - Modules and configuration files for the Pango
c libpolkit-gtk-1-0 - PolicyKit GTK+ API
c libpoppler-glib4 - PDF rendering library (GLib-based shared library)
c libpoppler5 - PDF rendering library
c libpostproc-extra-52 - bibliothèque de post-traitement vidéo de Libav
c libpostproc51 - Libav video postprocessing library
c libpulse-browse0 - PulseAudio client libraries (zeroconf support)
c libquvi0 - library for parsing video download links (runtime libraries)
c libraptor1 - Raptor RDF parser and serializer library
c librasqal2 - Rasqal RDF query library
c libreoffice-gcj - office productivity suite – Java libraries for GIJ
c librhythmbox-core4 - support library for the rhythmbox music player
c librpm1 - RPM shared library
c librpmio1 - RPM IO shared library
c libsdl1.2debian-alsa - Simple DirectMedia Layer (with X11 and ALSA options)
c libseed0 - GObject JavaScript bindings for the webkit engine - Runtime
c libslab0a - beautification app library file
c libsoundtouch1c2 - sound stretching library
c libsox1b - bibliothèque Sox pour les effets et le traitement audio
c libsqlite0 - bibliothèque partagée SQLite
c libswresample0 - FFmpeg audio rescaling library.
c libswscale-extra-2 - Libav video software scaling library
c libswscale0 - Libav video scaling library
c libtelepathy-farstream0 - Glue library between telepathy and farsight2
c libtracker-client-0.10-0 - metadata database, indexer and search tool - library
c libtracker-client-0.8-0 - metadata database, indexer and search tool - library
c libtracker-sparql-0.10-0 - metadata database, indexer and search tool - library
c libv8-3.4.14.21 - v8 JavaScript engine - runtime library
c libv8-3.5.10.24 - v8 JavaScript engine - runtime library
c libv8-3.6.6.14 - v8 JavaScript engine - runtime library
c libvlccore4 - base library for VLC and its modules
c libwebkit-1.0-2 - Web content engine library for Gtk+
c libwebp0 - Lossy compression of digital photographic images.
c libx264-116 - x264 video coding library
c libx264-118 - x264 video coding library
c libxalan2-java-gcj - XSL Transformations (XSLT) processor in Java (native code)
c libxcb-atom1 - utility libraries for X C Binding – atom
c libxcb-aux0 - utility libraries for X C Binding – aux
c libxcb-event1 - utility libraries for X C Binding – event
c libyajl1 - Yet Another JSON Library
c mono-2.0-devel - Mono development tools for CLI 2.0
c openoffice.org-core - office productivity suite – arch-dependent files
c portmap - RPC port mapper
c printer-driver-pnm2ppa - printer driver for HP-GDI printers
c python-axiom - base de données objet Python
c python-nevow - système de modelage d’applications web pour Python et Twisted
c python-twisted-conch - Twisted SSH Implementation
c python-twisted-core - environnement géré par événements pour applications réseau
c seahorse-plugins - seahorse plugins and utilities for encryption in GNOME [/quote]

Outch…

:118 Quel merdier pour le retour aptitude search ~c :mrgreen:

Sais tu que ce sont des paquets que tu as dé-installé, dont les fichiers de configuration sont toujours présent ?

Il te faut nettoyé ça! non ?

Auparavant, consultes ce lien sur le wiki. Supprimer tous les Fichiers de configuration orphelins

dpkg -P $(dpkg -l | awk '$1~/^rc$/{print $2}')

Sinon, la dé-installation de php se présente bien. :wink:

Donc, en live …

# aptitude remove --purge php5

Situation favorable pour une nouvelle install de php en mode simulation, après … :whistle:

j’essaye tout ça merci ! :slightly_smiling:

[quote]Paramétrage de php5-common (5.4.0-2) …
/var/lib/dpkg/info/php5-common.postinst: 21: local: not in a function[/quote]
Il y a une seule erreur dans tout ce fatras, le reste c’est juste les conséquences de cette erreur (comme ça touche php5-common ça concerne tous les paquets php5 du coup).

Fais voir le contenu de ce fichier /var/lib/dpkg/info/php5-common.postinst
Éventuellement, pour voir (mais j’y crois pas trop) :

Tu sais syam, à mon humble avis, nettoyé son php sera bénéfique, avec une (re)install toute propre, derrière. :wink:

Avec tous les .postinst que j’ai aperçu … :119

[quote]aptitude reinstall php5-common
Les paquets suivants seront RÉINSTALLÉS :
php5-common
0 paquets mis à jour, 0 nouvellement installés, 1 réinstallés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de télécharger 0 o d’archives. Après dépaquetage, 0 o seront utilisés.
Paramétrage de php5-common (5.4.0-2) …
/var/lib/dpkg/info/php5-common.postinst: 21: local: not in a function
dpkg : erreur de traitement de php5-common (–configure) :
le sous-processus script post-installation installé a retourné une erreur de sortie d’état 2
configured to not write apport reports
Des erreurs ont été rencontrées pendant l’exécution :
php5-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Échec de l’installation d’un paquet. Tentative de réparation :

[/quote]

:frowning:

et avec le purge ça donne :

[quote]aptitude purge php5-common
Les paquets suivants seront ENLEVÉS :
php5-common{p}
0 paquets mis à jour, 0 nouvellement installés, 1 à enlever et 0 non mis à jour.
Il est nécessaire de télécharger 0 o d’archives. Après dépaquetage, 890 ko seront libérés.
Voulez-vous continuer ? [Y/n/?]
(Lecture de la base de données… 241902 fichiers et répertoires déjà installés.)
Suppression de php5-common …
ls: impossible d’accéder à /etc/php5/conf.d/*.ini: Aucun fichier ou dossier de ce type
/usr/sbin/php5dismod: 108: /usr/sbin/php5dismod: FOUND: parameter not set
dpkg : erreur de traitement de php5-common (–purge) :
le sous-processus script pre-removal installé a retourné une erreur de sortie d’état 2
configured to not write apport reports
Des erreurs ont été rencontrées pendant l’exécution :
php5-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Échec de l’installation d’un paquet. Tentative de réparation :
[/quote]

solution :

  1. !root debian:/etc/apt# rm -rf /usr/sbin/php5dismod
  2. !root debian:/etc/apt# ln -s /bin/true /usr/sbin/php5dismod
  3. !root debian:/etc/apt# apt-get purge php5-common

Il y en a un, qui apparaît en tout et pour tout deux fois parce que apt-get (ou aptitude, je sais pas lequel il utilise) fait une « Tentative de réparation ». Ça fait très loin d’être « tous les »…
D’autant que l’erreur est claire, le problème vient du script postinst de php5-common.

D’ailleurs à ce sujet :

[code]# aptitude install php5-common/unstable
Les NOUVEAUX paquets suivants vont être installés :
php5-common
0 paquets mis à jour, 1 nouvellement installés, 0 à enlever et 4 non mis à jour.
Il est nécessaire de télécharger 586 ko d’archives. Après dépaquetage, 890 ko seront utilisés.
Prendre : 1 http://ftp.debian.org/debian/ unstable/main php5-common amd64 5.4.0-2 [586 kB]
Fetched 586 kB in 1s (548 kB/s)
Selecting previously unselected package php5-common.
(Lecture de la base de données… 136659 fichiers et répertoires déjà installés.)
Dépaquetage de php5-common (à partir de …/php5-common_5.4.0-2_amd64.deb) …
Paramétrage de php5-common (5.4.0-2) …

Creating config file /etc/php5/mods-available/pdo.ini with new version

cat /var/lib/dpkg/info/php5-common.postinst

#!/bin/sh

set -e

inidir=/etc/php5/mods-available
if [ “$1” = “configure” ]; then
for dsoname in pdo ; do
inifile=${dsoname}.ini
priority=$(sed -ne “s/^; priority=([0-9]+)$/\1/p” /usr/share/php5/common/${inifile})

    # Register new conffile with UCF
    ucf /usr/share/php5/common/${inifile} ${inidir}/${inifile}
    ucfr php5-common ${inidir}/${inifile}

    # Move pre-extension manager conffile
    dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/${inifile} ${inidir}/${inifile} 5.4.0~rc6-1 -- "$@";

    if [ -f "${inidir}/${inifile}.dpkg-new" ]; then
        local md5sum="$(md5sum ${inidir}/${inifile}.dpkg-new | sed -e 's/ .*//')"
        local old_md5sum="$(md5sum ${inidir}/${inifile} | sed -e 's/ .*//')"
        if [ "$md5sum" = "$old_md5sum" ]; then
            mv "${inidir}/${inifile}.dpkg-new" "${inidir}/${inifile}"
        fi
    fi

    # Enable the module
    php5enmod ${dsoname}/${priority:-20}
done

fi

exit 0[/code]
Le problème est encore plus clair : le script postinstall est foireux. Le problème ne se déclare que quand on a un PHP déjà installé (présence de /etc/php5/mods-available/pdo.ini), en effet il est interdit de déclarer une variable “local” en dehors d’une fonction.

@AnGe7 :

[code]# mv /etc/php5/mods-available/pdo.ini /etc/php5/mods-available/pdo.ini.bak

rm /etc/php5/mods-available/pdo.ini.dpkg-new

aptitude reinstall php5-common[/code]

Problème résolu :slightly_smiling:

Merci à vous tous :wink: