Skip to content

Commit b5ae109

Browse files
Document deb822 sources for Ubuntu 24.04 and later (GH-1885)
1 parent 0d5fbc0 commit b5ae109

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

getting-started/setup-building.rst

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,13 +790,31 @@ some of CPython's modules (for example, ``zlib``).
790790
dependencies for the Python you're working on by using the ``apt`` command.
791791

792792
First, make sure you have enabled the source packages in the sources list.
793-
You can do this by adding the location of the source packages, including
794-
URL, distribution name and component name, to ``/etc/apt/sources.list``.
795-
Take Ubuntu 22.04 LTS (Jammy Jellyfish) for example::
793+
Where those live depends on your release.
794+
795+
On **Ubuntu 24.04 and later**, and on other releases using the deb822
796+
format, the sources are in ``/etc/apt/sources.list.d/ubuntu.sources``.
797+
Add ``deb-src`` to the ``Types`` field of the entries you want sources
798+
for::
799+
800+
$ sudo nano /etc/apt/sources.list.d/ubuntu.sources
801+
802+
changing::
803+
804+
Types: deb
805+
806+
to::
807+
808+
Types: deb deb-src
809+
810+
On **Ubuntu 22.04 and other releases using the one-line format**, add the
811+
location of the source packages, including URL, distribution name and
812+
component name, to ``/etc/apt/sources.list``. Taking Ubuntu 22.04 LTS
813+
(Jammy Jellyfish) as the example::
796814

797815
$ deb-src http://archive.ubuntu.com/ubuntu/ jammy main
798816

799-
Alternatively, uncomment lines with ``deb-src`` using an editor, for
817+
Alternatively, uncomment the lines with ``deb-src`` using an editor, for
800818
example::
801819

802820
$ sudo nano /etc/apt/sources.list

0 commit comments

Comments
 (0)