我已经卸载了nginx。所以如果我再试一次:
$ sudo pacman -Rns nginx
error: target not found: nginx
但是当我检查时它仍在我的默认端口上运行:
$ sudo systemctl status nginx
Failed to dump process list, ignoring: Unit nginx.service not found.
● nginx.service
Loaded: not-found (Reason: No such file or directory)
Active: active (running) since Mon 2017-04-10 04:28:41 BST; 1 weeks 3 days ago
Main PID: 26966 (nginx)
CGroup: /system.slice/nginx.service
即使它说nginx.service not found
,但仍然说它是活跃的:
Active: active (running) since Mon 2017-04-10 04:28:41 BST; 1 weeks 3 days ago
发生了什么事?如何完全删除它?
有什么想法吗?
我正在尝试安装Apache。但是我有一个来自Apache的错误,因为它说端口80已经在使用了!
$ sudo systemctl status httpd
● httpd.service - Apache Web Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-04-20 23:32:36 BST; 14s ago
Process: 956 ExecStop=/usr/bin/httpd -k graceful-stop (code=exited, status=0/SUCCESS)
Process: 954 ExecStart=/usr/bin/httpd -k start -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 954 (code=exited, status=1/FAILURE)
Apr 20 23:32:35 localhost systemd[1]: Started Apache Web Server.
Apr 20 23:32:35 localhost httpd[954]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Apr 20 23:32:35 localhost httpd[954]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Apr 20 23:32:35 localhost httpd[954]: no listening sockets available, shutting down
Apr 20 23:32:35 localhost httpd[954]: AH00015: Unable to open logs
Apr 20 23:32:36 localhost systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Apr 20 23:32:36 localhost httpd[956]: httpd (no pid file) not running
Apr 20 23:32:36 localhost systemd[1]: httpd.service: Unit entered failed state.
Apr 20 23:32:36 localhost systemd[1]: httpd.service: Failed with result 'exit-code'.
答案 0 :(得分:0)
您可以使用sudo systemctl stop nginx.service
或@teelou提到的nginx服务停止,使用端口80终止进程
答案 1 :(得分:0)
这可能是因为您的浏览器中存在缓存文件。你应该试试这个:goto setting
- >选择clear browsing data
- >选择cached image and files
- >点击clear browsing data
,然后刷新您的页面。这适用于我。