![Debian 안정 버전에서 nginx 설치가 실패함](https://linux55.com/image/124749/Debian%20%EC%95%88%EC%A0%95%20%EB%B2%84%EC%A0%84%EC%97%90%EC%84%9C%20nginx%20%EC%84%A4%EC%B9%98%EA%B0%80%20%EC%8B%A4%ED%8C%A8%ED%95%A8.png)
nginx
을(를 ) 설치하려고 하면 apt
다음 오류가 발생합니다.
Selecting previously unselected package nginx-common.
(Reading database ... 137404 files and directories currently installed.)
Preparing to unpack .../00-nginx-common_1.10.3-1+deb9u1_all.deb ...
Unpacking nginx-common (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-auth-pam.
Preparing to unpack .../01-libnginx-mod-http-auth-pam_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-auth-pam (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-dav-ext.
Preparing to unpack .../02-libnginx-mod-http-dav-ext_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-dav-ext (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-echo.
Preparing to unpack .../03-libnginx-mod-http-echo_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-echo (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-geoip.
Preparing to unpack .../04-libnginx-mod-http-geoip_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-geoip (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-image-filter.
Preparing to unpack .../05-libnginx-mod-http-image-filter_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-subs-filter.
Preparing to unpack .../06-libnginx-mod-http-subs-filter_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-subs-filter (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-upstream-fair.
Preparing to unpack .../07-libnginx-mod-http-upstream-fair_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-upstream-fair (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-xslt-filter.
Preparing to unpack .../08-libnginx-mod-http-xslt-filter_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-mail.
Preparing to unpack .../09-libnginx-mod-mail_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-mail (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-stream.
Preparing to unpack .../10-libnginx-mod-stream_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-stream (1.10.3-1+deb9u1) ...
Selecting previously unselected package nginx-full.
Preparing to unpack .../11-nginx-full_1.10.3-1+deb9u1_amd64.deb ...
Unpacking nginx-full (1.10.3-1+deb9u1) ...
Selecting previously unselected package nginx.
Preparing to unpack .../12-nginx_1.10.3-1+deb9u1_all.deb ...
Unpacking nginx (1.10.3-1+deb9u1) ...
Processing triggers for ufw (0.35-4) ...
Setting up nginx-common (1.10.3-1+deb9u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service.
Setting up libnginx-mod-http-image-filter (1.10.3-1+deb9u1) ...
Setting up libnginx-mod-http-subs-filter (1.10.3-1+deb9u1) ...
Processing triggers for systemd (232-25+deb9u1) ...
Setting up libnginx-mod-http-auth-pam (1.10.3-1+deb9u1) ...
Setting up libnginx-mod-http-dav-ext (1.10.3-1+deb9u1) ...
Setting up libnginx-mod-mail (1.10.3-1+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libnginx-mod-http-xslt-filter (1.10.3-1+deb9u1) ...
Setting up libnginx-mod-http-upstream-fair (1.10.3-1+deb9u1) ...
Setting up libnginx-mod-http-geoip (1.10.3-1+deb9u1) ...
Setting up libnginx-mod-stream (1.10.3-1+deb9u1) ...
Setting up libnginx-mod-http-echo (1.10.3-1+deb9u1) ...
Setting up nginx-full (1.10.3-1+deb9u1) ...
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.
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-01-03 08:12:19 GMT; 35ms ago
Docs: man:nginx(8)
Process: 1563 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 1561 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Jan 03 08:12:17 testingBed nginx[1563]: nginx: [emerg] listen() to [::]:80, …se)
Jan 03 08:12:18 testingBed nginx[1563]: nginx: [emerg] listen() to 0.0.0.0:8…se)
Jan 03 08:12:18 testingBed nginx[1563]: nginx: [emerg] listen() to [::]:80, …se)
Jan 03 08:12:18 testingBed nginx[1563]: nginx: [emerg] listen() to 0.0.0.0:8…se)
Jan 03 08:12:18 testingBed nginx[1563]: nginx: [emerg] listen() to [::]:80, …se)
Jan 03 08:12:19 testingBed nginx[1563]: nginx: [emerg] still could not bind()
Jan 03 08:12:19 testingBed systemd[1]: nginx.service: Control process exite…us=1
Jan 03 08:12:19 testingBed systemd[1]: Failed to start A high performance w…ver.
Jan 03 08:12:19 testingBed systemd[1]: nginx.service: Unit entered failed state.
Jan 03 08:12:19 testingBed systemd[1]: nginx.service: Failed with result 'e…de'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package nginx-full (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-full (<< 1.10.3-1+deb9u1.1~) | nginx-light (<< 1.10.3-1+deb9u1.1~) | nginx-extras (<< 1.10.3-1+deb9u1.1~); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-full (>= 1.10.3-1+deb9u1) | nginx-light (>= 1.10.3-1+deb9u1) | nginx-extras (>= 1.10.3-1+deb9u1); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.
dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
Processing triggers for ufw (0.35-4) ...
Errors were encountered while processing:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
답변1
오류 메시지에는 nginx
포트 80에 바인딩할 수 없다고 나와 있습니다.
가장 가능성 있는 원인은 이미 포트 80을 수신하는 다른 웹 서버(아마도 apache
이전 버전) 가 있다는 것입니다 nginx
.
이 경우 이전 웹 서버를 중지하고 설치를 계속하십시오.
dpkg --configure --pending
nginx
또 다른 옵션은 다른 포트에서 수신하도록 구성(또는 아파치)하는 것입니다 . 8080은 "보조" 웹 서버에 일반적이고 널리 사용되는 선택입니다. 또는 호스트에 사용 가능한 IP 주소가 여러 개 있는 경우 다른 IP 주소를 사용하십시오.