J'essaie d'installer nginx
, mais le message d'erreur suivant s'affiche:
kurt@kurt-ThinkPad:~$ Sudo apt-get install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gyp libjs-inherits libjs-node-uuid libuv1 libuv1-dev linux-headers-4.4.0-47
linux-headers-4.4.0-47-generic linux-image-4.4.0-47-generic
linux-image-extra-4.4.0-47-generic node-abbrev node-ansi
node-ansi-color-table node-archy node-async node-block-stream
node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent
node-form-data node-fstream node-fstream-ignore node-github-url-from-git
node-glob node-graceful-fs node-gyp node-inherits node-ini
node-json-stringify-safe node-lockfile node-lru-cache node-mime
node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
node-normalize-package-data node-npmlog node-once node-osenv node-qs
node-read node-read-package-json node-request node-retry node-rimraf
node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
node-underscore node-which
Use 'Sudo apt autoremove' to remove them.
The following additional packages will be installed:
nginx-common nginx-core
Suggested packages:
fcgiwrap nginx-doc
The following NEW packages will be installed:
nginx nginx-common nginx-core
0 upgraded, 3 newly installed, 0 to remove and 9 not upgraded.
Need to get 458 kB of archives.
After this operation, 1482 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main AMD64 nginx-common all 1.10.0-0ubuntu0.16.04.4 [26,6 kB]
Get:2 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main AMD64 nginx-core AMD64 1.10.0-0ubuntu0.16.04.4 [428 kB]
Get:3 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main AMD64 nginx all 1.10.0-0ubuntu0.16.04.4 [3498 B]
Fetched 458 kB in 0s (685 kB/s)
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 501856 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.10.0-0ubuntu0.16.04.4_all.deb ...
Unpacking nginx-common (1.10.0-0ubuntu0.16.04.4) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../nginx-core_1.10.0-0ubuntu0.16.04.4_AMD64.deb ...
Unpacking nginx-core (1.10.0-0ubuntu0.16.04.4) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.10.0-0ubuntu0.16.04.4_all.deb ...
Unpacking nginx (1.10.0-0ubuntu0.16.04.4) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for systemd (229-4ubuntu12) ...
Setting up nginx-common (1.10.0-0ubuntu0.16.04.4) ...
Setting up nginx-core (1.10.0-0ubuntu0.16.04.4) ...
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-core (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-core (>= 1.10.0-0ubuntu0.16.04.4) | nginx-full (>= 1.10.0-0ubuntu0.16.04.4) | nginx-light (>= 1.10.0-0ubuntu0.16.04.4) | nginx-extras (>= 1.10.0-0ubuntu0.16.04.4); however:
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-core (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-full (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-light (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-extras (<< 1.10.0-0ubuntu0.16.04.4.1~); however:
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
dpkg: error processing package nginx (--configure):
dependency problems - leaving No apport report written because the error message indicates its a followup error from a previous failure.
unconfigured
Processing triggers for systemd (229-4ubuntu12) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Voici un extrait pertinent de /var/log/syslog
:
Dec 6 12:04:47 kurt-ThinkPad systemd[1]: Started CUPS Scheduler.
Dec 6 12:04:47 kurt-ThinkPad systemd[1]: Started ACPI event daemon.
Dec 6 12:04:48 kurt-ThinkPad systemd[1]: Reloading.
Dec 6 12:04:48 kurt-ThinkPad systemd[1]: snapd.refresh.timer: Adding 5h 37min 39.335667s random time.
Dec 6 12:04:48 kurt-ThinkPad systemd[1]: Started CUPS Scheduler.
Dec 6 12:04:48 kurt-ThinkPad systemd[1]: Started ACPI event daemon.
Dec 6 12:04:48 kurt-ThinkPad systemd[1]: Reloading.
Dec 6 12:04:49 kurt-ThinkPad systemd[1]: snapd.refresh.timer: Adding 3h 39min 30.123677s random time.
Dec 6 12:04:49 kurt-ThinkPad systemd[1]: Started CUPS Scheduler.
Dec 6 12:04:49 kurt-ThinkPad systemd[1]: Started ACPI event daemon.
Dec 6 12:04:49 kurt-ThinkPad systemd[1]: Starting A high performance web server and a reverse proxy server...
Dec 6 12:04:49 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 6 12:04:49 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 6 12:04:49 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 6 12:04:49 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 6 12:04:50 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 6 12:04:50 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 6 12:04:50 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 6 12:04:50 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 6 12:04:51 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 6 12:04:51 kurt-ThinkPad nginx[6334]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 6 12:04:51 kurt-ThinkPad nginx[6334]: nginx: [emerg] still could not bind()
Dec 6 12:04:51 kurt-ThinkPad systemd[1]: nginx.service: Control process exited, code=exited status=1
Dec 6 12:04:51 kurt-ThinkPad systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Dec 6 12:04:51 kurt-ThinkPad systemd[1]: nginx.service: Unit entered failed state.
Dec 6 12:04:51 kurt-ThinkPad systemd[1]: nginx.service: Failed with result 'exit-code'.
Des idées pour lesquelles l'installation ne fonctionne pas? (La réponse à un problème similaire, E: Le sous-processus/usr/bin/dpkg a renvoyé un code d'erreur (1) [lié à Google Chrome] , suggère que certains fichiers sont corrompus).
Mettre à jour
Voici également le message d'erreur généré par Ubuntu à envoyer à sa communauté de développement:
Voir la ligne
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Cela signifie qu’un serveur Web est déjà en cours d’exécution (écoute sur le port 80 nécessaire à nginx). Essayez cette commande pour identifier quel processus utilise le port 80:
netstat -tlnp | fgrep -w :80
Désinstallez ce serveur ou reconfigurez-le de sorte qu'il utilise un autre port que 80.