NginX install failed


as proposed in lection 2 I did

sudo apt-get update && sudo apt-get install -y ca-certificates nginx 

but the installation failed with

Err:16 focal Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 443]
Get:17 focal InRelease [4679 B]
Get:18 focal InRelease [4685 B]
Get:19 focal/main amd64 Packages [774 kB]
Get:20 focal/main amd64 Packages [1189 kB]
Reading package lists... Done
E: The repository ' focal Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


sudo systemctl status nginx
Unit nginx.service could not be found.

how to fix that in the course rosject ?

Hi @db_vk,

thank you very much for reporting this error, caused because the certificates for OpenVPN has expired.

While we solve the problem, you could remove the openvpn-related APT files using the following command:

sudo rm -fv /etc/apt/sources.list.d/openvpn-aptrepo.list

After doing that, you should be able to install nginx with no problems.


Hi @ralves ,

that did work after some complains

Fetched 605 kB in 0s (5172 kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/ line 76,<> line 7.)
debconf: falling back to frontend: Readline
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 209833 files and directories currently installed.)
Preparing to unpack .../0-nginx-common_1.18.0-0ubuntu1.4_all.deb ...
Unpacking nginx-common (1.18.0-0ubuntu1.4) ...
Selecting previously unselected package libnginx-mod-http-image-filter.
Preparing to unpack .../1-libnginx-mod-http-image-filter_1.18.0-0ubuntu1.4_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.18.0-0ubuntu1.4) ...
Selecting previously unselected package libnginx-mod-http-xslt-filter.
Preparing to unpack .../2-libnginx-mod-http-xslt-filter_1.18.0-0ubuntu1.4_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.18.0-0ubuntu1.4) ...
Selecting previously unselected package libnginx-mod-mail.
Preparing to unpack .../3-libnginx-mod-mail_1.18.0-0ubuntu1.4_amd64.deb ...
Unpacking libnginx-mod-mail (1.18.0-0ubuntu1.4) ...
Selecting previously unselected package libnginx-mod-stream.
Preparing to unpack .../4-libnginx-mod-stream_1.18.0-0ubuntu1.4_amd64.deb ...
Unpacking libnginx-mod-stream (1.18.0-0ubuntu1.4) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../5-nginx-core_1.18.0-0ubuntu1.4_amd64.deb ...
Unpacking nginx-core (1.18.0-0ubuntu1.4) ...
Selecting previously unselected package nginx.
Preparing to unpack .../6-nginx_1.18.0-0ubuntu1.4_all.deb ...
Unpacking nginx (1.18.0-0ubuntu1.4) ...
Setting up nginx-common (1.18.0-0ubuntu1.4) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/ line 76.)
debconf: falling back to frontend: Readline
Created symlink /etc/systemd/system/ -> /lib/systemd/system/nginx.service.
Setting up libnginx-mod-http-xslt-filter (1.18.0-0ubuntu1.4) ...
Setting up libnginx-mod-mail (1.18.0-0ubuntu1.4) ...
Setting up libnginx-mod-http-image-filter (1.18.0-0ubuntu1.4) ...
Setting up libnginx-mod-stream (1.18.0-0ubuntu1.4) ...
Setting up nginx-core (1.18.0-0ubuntu1.4) ...
invoke-rc.d: policy-rc.d denied execution of start.
Setting up nginx (1.18.0-0ubuntu1.4) ...
Processing triggers for systemd (245.4-4ubuntu3.17) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ufw (0.36-6) ...
Rules updated for profile 'Husarnet'


user:~$ sudo service nginx start
user:~$ sudo service nginx status
* nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) 

seems to work !

thanks a lot for the quick reponse


1 Like

Hi @db_vk,

I’m passing by to let you know that the error has been fixed in the course itself.

Thank you very much for reporting it. We wouldn’t have it fixed today if weren’t for your help.

Keep pushing your ROS Learning.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.