在Ubuntu 18.04上重新安装Nginx时遇到问题

时间:2020-05-16 01:55:15

标签: nginx ubuntu-18.04 nginx-reverse-proxy nginx-config serve

出于某些原因,我在ubuntu服务器上运行,但我卸载了nginx。我需要重新安装

但是当我想重新安装它会给我错误

enter image description here

我要安装时

usa@dl:~$ sudo apt-get install nginx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package nginx is a virtual package provided by:
  nginx-light 1.14.0-0ubuntu1
  nginx-full 1.14.0-0ubuntu1
  nginx-extras 1.14.0-0ubuntu1
You should explicitly select one to install.

我使用该命令将其完全卸载,但仍然不能

任何想法

1 个答案:

答案 0 :(得分:0)

我想您现在已经知道没有可用的“ nginx”软件包。首次安装时可能有一个,但现在没有。您需要从列表中安装一个。

因此,这些命令中的任何一个都将起作用:

sudo apt-get install nginx-light
sudo apt-get install nginx-full
sudo apt-get install nginx-extras