-1

I just upgraded to Ubuntu 22.04 Jammy from 20.04. I try to install Qgis following the instructions (https://www.qgis.org/en/site/forusers/alldownloads.html). When I try to run sudo apt update I get the message: Malformed stanza 1 in source list /etc/apt/sources.list.d/qgis.sources (type) The list of sources could not be read.

This is the string I added deb http://it.archive.ubuntu.com/ubuntu/ jammy-updates universe deb-src http://it.archive.ubuntu.com/ubuntu/ focal-updates universe

Anyone knows where I make a mistake? Thanks in advance

graham
  • 13,061

1 Answers1

0

I get the message: Malformed stanza 1 in source list /etc/apt/sources.list.d/qgis.sources (type) The list of sources could not be read.

Please Edit your question including output of cat /etc/apt/sources.list.d/qgis.sources to see what is the malformed stanza 1 error means.

I tried your source based on your link. it Works for me :

Types: deb deb-src
URIs: https://qgis.org/ubuntu-ltr
Suites: jammy
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg

For Alternative software repositories you can add qgis.list from Ubuntu GIS repository :

  • Stable :

    deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu jammy main 
    deb-src http://ppa.launchpad.net/ubuntugis/ppa/ubuntu jammy main
    
  • Unstable :

    deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu jammy main 
    deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu jammy main 
    

Try to check your Qgis package candidate, run :

apt-cache policy qgis
qgis:
  Installed: (none)
  Candidate: 1:3.26.2+36jammy
  Version table:
     1:3.26.2+36jammy 500
        500 https://qgis.org/ubuntu jammy/main amd64 Packages
     3.22.4+dfsg-3build1 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

You can see above detail, you can get latest release of Qgis version 3.26.

Sad3ng
  • 443
  • 1
  • 3
  • 10