1

I just upgraded from 22.04 to 24.04, when I ran ap update I got the following errors.

Ign:1 https://ppa.launchpadcontent.net/nginx/stable/ubuntu noble InRelease
Err:2 https://ppa.launchpadcontent.net/nginx/stable/ubuntu noble Release
  404  Not Found [IP: 185.125.190.80 443]

........ Reading package lists... Done E: The repository 'https://ppa.launchpadcontent.net/nginx/stable/ubuntu noble Release' does not have 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.

How can I get the updated version of NGINX repositry?

Thomas Ward
  • 78,878
lslamp
  • 11

1 Answers1

4

The NGINX PPAs are no longer used for 22.04 or 24.04. The configuration has become overly complicated from Debian. As of now, if you MUST have the latest NGINX, you should follow the official NGINX instructions to use their repositories instead.


The official NGINX instructions linked above use the traditional apt list style, however in 24.04 and later, DEB822 sources files are easier to read and understand. So I am adapting the official NGINX instructions here to use DEB822.

  1. Install all prerequisites.

    sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring
    
  2. Download and store the official NGINX signing key so apt can verify packages.

    curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /etc/apt/keyrings/nginx-archive-keyring.gpg >/dev/null
    
  3. Verify this file has a key with fingerprint 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 in it:

    gpg --dry-run --quiet --no-keyring --import --import-options import-show /etc/apt/keyrings/nginx-archive-keyring.gpg
    
  4. Create the file /etc/apt/sources.list.d/nginx.sources with the following content. Where {SUITE} is below, replace it with the output of lsb_release -cs:

    Types: deb
    URIs: http://nginx.org/packages/ubuntu
    Suites: {SUITE}
    Components: nginx
    Architectures: amd64
    Signed-By: /etc/apt/keyrings/nginx-archive-keyring.gpg
    

    You don't need to follow the 'apt pinning' that the NGINX documentation says to provide for now.

  1. Run sudo apt update && sudo apt install nginx to update your repository sources and install NGINX from the upstream repositories.
Thomas Ward
  • 78,878