Impossible d'installer Apache2, Php et mysql

Résolu/Fermé
r.odet - 22 déc. 2016 à 13:56
barnabe0057 Messages postés 14440 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 19 avril 2024 - 22 déc. 2016 à 18:47
Bonjour,
je tente en vain d'installer sur un VPS apache 2, php5, mysql et phpmyadmin
étant débutant je ne sais pas pourquoi lorsque j'installe apache ou php j'obtient cela :
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2 is already the newest version.
The following packages were automatically installed and are no longer required:
libexif12 libgd2-xpm libgusb2 libieee1284-3 libsane-extras libsane-extras-common libusb-1.0-0 libv4l-0 libv4lconvert0
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
php-pear
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
44 not fully installed or removed.
Need to get 0 B/284 kB of archives.
After this operation, 2180 kB of additional disk space will be used.
(Reading database ... 42191 files and directories currently installed.)
Preparing to replace php-pear 1:1.10.1+submodules+notgz-8.1 (using .../php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb) ...
dpkg-maintscript-helper: error: command symlink_to_dir is unknown
Hint: upgrading dpkg to a newer version might help.

Usage: dpkg-maintscript-helper <command> <parameter>... -- <maintainer-script-parameter>...

Commands:
supports <command>
Returns 0 (success) if the given command is supported, 1 otherwise.
rm_conffile <conffile> [<last-version> [<package>]]
Remove obsolete conffile. Must be called in preinst, postinst and
postrm.
mv_conffile <old-conf> <new-conf> [<last-version> [<package>]]
Rename a conffile. Must be called in preinst, postinst and postrm.
help
Display this usage information.
dpkg: error processing /var/cache/apt/archives/php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
dpkg-maintscript-helper: error: command symlink_to_dir is unknown
Hint: upgrading dpkg to a newer version might help.

Usage: dpkg-maintscript-helper <command> <parameter>... -- <maintainer-script-parameter>...

Commands:
supports <command>
Returns 0 (success) if the given command is supported, 1 otherwise.
rm_conffile <conffile> [<last-version> [<package>]]
Remove obsolete conffile. Must be called in preinst, postinst and
postrm.
mv_conffile <old-conf> <new-conf> [<last-version> [<package>]]
Rename a conffile. Must be called in preinst, postinst and postrm.
help
Display this usage information.
dpkg: error while cleaning up:
subprocess new post-removal script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

je vous remercie de votre réponse
Cordialement
R.Odet

A voir également:

2 réponses

barnabe0057 Messages postés 14440 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 19 avril 2024 4 908
Modifié par barnabe0057 le 22/12/2016 à 15:51
Bonjour,

Essaie ces commandes :
apt-get autoremove
apt-get autoremove --purge apache2 php5 php-pear
apt-get update && apt-get upgrade
0
Bonjour,
j'ai essayé les commandes et j'obtient cela :
apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
php-pear
The following packages will be REMOVED:
libexif12 libgd2-xpm libgusb2 libieee1284-3 libsane-extras libsane-extras-common libusb-1.0-0 libv4l-0 libv4lconvert0
The following packages will be upgraded:
php-pear
1 upgraded, 0 newly installed, 9 to remove and 1 not upgraded.
44 not fully installed or removed.
Need to get 0 B/284 kB of archives.
After this operation, 1343 kB disk space will be freed.
Do you want to continue [Y/n]? Y
Abort.
root@morpheus:~# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
php-pear
The following packages will be REMOVED:
libexif12 libgd2-xpm libgusb2 libieee1284-3 libsane-extras libsane-extras-common libusb-1.0-0 libv4l-0 libv4lconvert0
The following packages will be upgraded:
php-pear
1 upgraded, 0 newly installed, 9 to remove and 1 not upgraded.
44 not fully installed or removed.
Need to get 0 B/284 kB of archives.
After this operation, 1343 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 42191 files and directories currently installed.)
Preparing to replace php-pear 1:1.10.1+submodules+notgz-8.1 (using .../php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb) ...
dpkg-maintscript-helper: error: command symlink_to_dir is unknown
Hint: upgrading dpkg to a newer version might help.

Usage: dpkg-maintscript-helper <command> <parameter>... -- <maintainer-script-parameter>...

Commands:
supports <command>
Returns 0 (success) if the given command is supported, 1 otherwise.
rm_conffile <conffile> [<last-version> [<package>]]
Remove obsolete conffile. Must be called in preinst, postinst and
postrm.
mv_conffile <old-conf> <new-conf> [<last-version> [<package>]]
Rename a conffile. Must be called in preinst, postinst and postrm.
help
Display this usage information.
dpkg: error processing /var/cache/apt/archives/php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
dpkg-maintscript-helper: error: command symlink_to_dir is unknown
Hint: upgrading dpkg to a newer version might help.

Usage: dpkg-maintscript-helper <command> <parameter>... -- <maintainer-script-parameter>...

Commands:
supports <command>
Returns 0 (success) if the given command is supported, 1 otherwise.
rm_conffile <conffile> [<last-version> [<package>]]
Remove obsolete conffile. Must be called in preinst, postinst and
postrm.
mv_conffile <old-conf> <new-conf> [<last-version> [<package>]]
Rename a conffile. Must be called in preinst, postinst and postrm.
help
Display this usage information.
dpkg: error while cleaning up:
subprocess new post-removal script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@morpheus:~# apt-get autoremove --purge apache2 php5 php-pear
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
apache2* libapache2-mod-php5* libexif12* libgd2-xpm* libgusb2* libieee1284-3* libonig2* libqdbm14* libsane-extras* libsane-extras-common* libusb-1.0-0* libv4l-0*
libv4lconvert0* php-pear* php5* php5-cli* php5-common*
0 upgraded, 0 newly installed, 17 to remove and 1 not upgraded.
44 not fully installed or removed.
After this operation, 26.2 MB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 42189 files and directories currently installed.)
Removing apache2 ...
Removing php5 ...
Removing libapache2-mod-php5 ...
Purging configuration files for libapache2-mod-php5 ...
dpkg: error processing php-pear (--purge):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
Removing php5-cli ...
Purging configuration files for php5-cli ...
Removing php5-common ...
Purging configuration files for php5-common ...
Removing libexif12:amd64 ...
Purging configuration files for libexif12:amd64 ...
Removing libgd2-xpm:amd64 ...
Purging configuration files for libgd2-xpm:amd64 ...
Removing libgusb2 ...
Purging configuration files for libgusb2 ...
Removing libieee1284-3:amd64 ...
Purging configuration files for libieee1284-3:amd64 ...
Removing libonig2 ...
Purging configuration files for libonig2 ...
Removing libqdbm14 ...
Purging configuration files for libqdbm14 ...
Removing libsane-extras:amd64 ...
Purging configuration files for libsane-extras:amd64 ...
Removing libsane-extras-common ...
Removing libusb-1.0-0:amd64 ...
Purging configuration files for libusb-1.0-0:amd64 ...
Removing libv4l-0:amd64 ...
Purging configuration files for libv4l-0:amd64 ...
Removing libv4lconvert0:amd64 ...
Purging configuration files for libv4lconvert0:amd64 ...
Processing triggers for man-db ...
Errors were encountered while processing:
php-pear
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@morpheus:~# apt-get update && apt-get upgrade
Hit http://packages.dotdeb.org jessie Release.gpg
Get:1 http://security.debian.org wheezy/updates Release.gpg [1554 B]
Hit http://packages.dotdeb.org wheezy-php56 Release.gpg
Hit http://ftp.debian.org wheezy Release.gpg
Hit http://packages.dotdeb.org jessie Release
Hit http://ftp.debian.org wheezy Release
Get:2 http://security.debian.org wheezy/updates Release [39.0 kB]
Hit http://packages.dotdeb.org wheezy-php56 Release
Hit http://packages.dotdeb.org jessie/all amd64 Packages
Hit http://packages.dotdeb.org jessie/all i386 Packages
Hit http://ftp.debian.org wheezy/main amd64 Packages
Hit http://ftp.debian.org wheezy/contrib amd64 Packages
Ign http://packages.dotdeb.org jessie/all Translation-en
Get:3 http://security.debian.org wheezy/updates/main amd64 Packages [457 kB]
Hit http://ftp.debian.org wheezy/non-free amd64 Packages
Hit http://ftp.debian.org wheezy/main i386 Packages
Hit http://ftp.debian.org wheezy/contrib i386 Packages
Hit http://ftp.debian.org wheezy/non-free i386 Packages
Hit http://ftp.debian.org wheezy/contrib Translation-en
Hit http://ftp.debian.org wheezy/main Translation-en
Hit http://ftp.debian.org wheezy/non-free Translation-en
Hit http://packages.dotdeb.org wheezy-php56/all Sources
Get:4 http://security.debian.org wheezy/updates/contrib amd64 Packages [14 B]
Hit http://packages.dotdeb.org wheezy-php56/all amd64 Packages
Hit http://packages.dotdeb.org wheezy-php56/all i386 Packages
Get:5 http://security.debian.org wheezy/updates/non-free amd64 Packages [14 B]
Get:6 http://security.debian.org wheezy/updates/main i386 Packages [460 kB]
Ign http://packages.dotdeb.org wheezy-php56/all Translation-en
Get:7 http://security.debian.org wheezy/updates/contrib i386 Packages [14 B]
Get:8 http://security.debian.org wheezy/updates/non-free i386 Packages [14 B]
Get:9 http://security.debian.org wheezy/updates/contrib Translation-en [14 B]
Get:10 http://security.debian.org wheezy/updates/main Translation-en [251 kB]
Get:11 http://security.debian.org wheezy/updates/non-free Translation-en [14 B]
Fetched 1208 kB in 4s (294 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try using -f.

Doit-je réessayer d'installer Apache, Php... ?
Merci
Cordialement
0
barnabe0057 Messages postés 14440 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 19 avril 2024 4 908
Modifié par barnabe0057 le 22/12/2016 à 16:49
Pourquoi tu as des dépôts pour Debian 7 et pour Debian 8 ?

Il faut supprimer les dépôts pour Debian 8 (Jessie) puisque apparemment tu es sous Debian 7 (Wheezy), pour cela édite le fichier des dépôts avec la commande suivante :

nano /etc/apt/sources.list
0
Non actuellement je suis sur Debian 7, le serveur n'était pas à moi auparavant et je ne savais pas qu'il y avait des dépôts Debian 8.
0
barnabe0057 Messages postés 14440 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 19 avril 2024 4 908 > r.odet
22 déc. 2016 à 16:53
Une fois que le ménage aura été fait dans les dépôts ça devrait aller mieux.
0
Dans mon fichier sources.list, il n'y-a que deux entrées sont-elles correctes ?
deb http://ftp.debian.org/debian wheezy main contrib non-free
deb http://security.debian.org wheezy/updates main contrib non-free

Merci
0
barnabe0057 Messages postés 14440 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 19 avril 2024 4 908 > r.odet
Modifié par barnabe0057 le 22/12/2016 à 17:14
Oui, refais un apt-get update pour vérifier.
0
Voici le résultat de mon apt-get update :
apt-get update
Get:1 http://security.debian.org wheezy/updates Release.gpg [1554 B]
Hit http://ftp.debian.org wheezy Release.gpg
Get:2 http://security.debian.org wheezy/updates Release [39.0 kB]
Hit http://ftp.debian.org wheezy Release
Hit http://ftp.debian.org wheezy/main amd64 Packages
Hit http://ftp.debian.org wheezy/contrib amd64 Packages
Hit http://ftp.debian.org wheezy/non-free amd64 Packages
Get:3 http://security.debian.org wheezy/updates/main amd64 Packages [457 kB]
Hit http://ftp.debian.org wheezy/main i386 Packages
Hit http://ftp.debian.org wheezy/contrib i386 Packages
Hit http://ftp.debian.org wheezy/non-free i386 Packages
Hit http://ftp.debian.org wheezy/contrib Translation-en
Hit http://ftp.debian.org wheezy/main Translation-en
Hit http://packages.dotdeb.org wheezy-php56 Release.gpg
Hit http://ftp.debian.org wheezy/non-free Translation-en
Hit http://packages.dotdeb.org wheezy-php56 Release
Get:4 http://security.debian.org wheezy/updates/contrib amd64 Packages [14 B]
Get:5 http://security.debian.org wheezy/updates/non-free amd64 Packages [14 B]
Get:6 http://security.debian.org wheezy/updates/main i386 Packages [460 kB]
Hit http://packages.dotdeb.org wheezy-php56/all Sources
Hit http://packages.dotdeb.org wheezy-php56/all amd64 Packages
Hit http://packages.dotdeb.org wheezy-php56/all i386 Packages
Get:7 http://security.debian.org wheezy/updates/contrib i386 Packages [14 B]
Ign http://packages.dotdeb.org wheezy-php56/all Translation-en
Get:8 http://security.debian.org wheezy/updates/non-free i386 Packages [14 B]
Get:9 http://security.debian.org wheezy/updates/contrib Translation-en [14 B]
Get:10 http://security.debian.org wheezy/updates/main Translation-en [251 kB]
Get:11 http://security.debian.org wheezy/updates/non-free Translation-en [14 B]
Fetched 1208 kB in 3s (348 kB/s)
Reading package lists... Done

Merci
0