On freshly installed from scratch (not an upgrade) Ubuntu 24.04 I get this error when I run
$ sudo apt-get build-dep -y vlc
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list
Prior to 24.04 fix was to make edits to /etc/apt/sources.list
, but now on 24.04:
$ cat /etc/apt/sources.list
# Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources
here is new file on 24.04
$ cat /etc/apt/sources.list.d/ubuntu.sources
Types: deb
URIs: http://us.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports noble-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
How do I add deb-src
to the new file /etc/apt/sources.list.d/ubuntu.sources
?
There is a new config file location with a new file format layout for 24.04 unlike previous Ubuntu releases
Add the below snippet to the new config file
/etc/apt/sources.list.d/ubuntu.sources
NOTE if the machine is under control of
cloud-init
(ignore this for those viewers at home this pertains to some remote cloud Ubuntu VM not your home laptop) instead make a similar addition ofdeb-src
to the template file as perIf you want to do this using a one line command:
final updated file will become