返回信息流apt update一下先
这是一条镜像帖。来源:北邮人论坛 / linux / #160686同步于 2022/5/25
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Linux机器人发帖
Re: 树莓派咋安装nginx
sjw1996
2022/5/25镜像同步7 回复
订阅后,新回复会通过你的通知中心匿名送达。
7 条回复
pi@raspberrypi:~ $ sudo systemctl status nginx.service
● 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 Thu 2022-05-26 02:45:04 BST; 1min 5s ago
Docs: man:nginx(8)
Process: 781 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
May 26 02:45:03 raspberrypi systemd[1]: Starting A high performance web server and a reverse proxy server...
May 26 02:45:04 raspberrypi nginx[781]: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
May 26 02:45:04 raspberrypi nginx[781]: nginx: configuration file /etc/nginx/nginx.conf test failed
May 26 02:45:04 raspberrypi systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
May 26 02:45:04 raspberrypi systemd[1]: nginx.service: Failed with result 'exit-code'.
May 26 02:45:04 raspberrypi systemd[1]: Failed to start A high performance web server and a reverse proxy server.
May 26 02:45:04 raspberrypi nginx[781]: nginx: configuration file /etc/nginx/nginx.conf test failed
[emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
你本机有ipv6栈吗?
我看了所有配置文件里都没有启用ipv6,然后用源码安装了一下又正常了,估计是依赖问题[em11]
【 在 Okuzora 的大作中提到: 】
: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
: 你本机有ipv6栈吗?
[::]就是ipv6的0.0.0.0,推测是你系统没有ipv6栈。把配置文件里的listen行注释掉应该就行了
【 在 aq423 的大作中提到: 】
: 我看了所有配置文件里都没有启用ipv6,然后用源码安装了一下又正常了,估计是依赖问题