Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] apt source throws "Unable to find a source package" despite deb-src in sources.list

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
craoson
Posts: 3
Joined: 2022-01-27 07:40

[SOLVED] apt source throws "Unable to find a source package" despite deb-src in sources.list

#1 Post by craoson »

Hi,
I'm having problems with "apt source". After having enabled deb-src in my sources.list and run "apt update", apt fails to download any source packages :

Code: Select all

$ apt source hello
Reading package lists... Done
E: Unable to find a source package for hello
An intensive internet search hasn't provided any clue (just "check your sources.list for deb-src and don't forget to update apt"). What am I missing here ?

Code: Select all

// apt.conf
Acquire::Languages { "environment"; "fr_FR"; "fr"; "en"; };
APT::Default-Release "/^bullseye(|-security|-updates)$/";
APT::Cache-Limit "90000000";

Code: Select all

// preferences
Package: *
Pin: origin ""
Pin-Priority: 990

Package: *
Pin: origin "deb.nodesource.com"
Pin-Priority: 990

Package: npm
Pin: release o=Debian
Pin-Priority: -1

Package: nodejs*
Pin: release o=Debian
Pin-Priority: -1

Package: libnode-dev
Pin: release o=Debian
Pin-Priority: -1

Package: libnode64
Pin: release o=Debian
Pin-Priority: -1

Package: node-*
Pin: release o=Debian
Pin-Priority: -1

Package: *
Pin: release o=Debian,n=bullseye-security
Pin-Priority: 990

Package: *
Pin: release a=bullseye
Pin-Priority: 989

Package: *
Pin: release o=Debian,n=testing-security
Pin-Priority: 99

Package: *
Pin: release a=testing
Pin-Priority: 80

Code: Select all

// sources.list
deb http://debian.proxad.net/debian/ bullseye main contrib non-free
deb-src http://debian.proxad.net/debian/ bullseye main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

deb http://deb.torproject.org/torproject.org bullseye main
deb-src http://deb.torproject.org/torproject.org bullseye main

deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
Last edited by craoson on 2022-02-09 07:47, edited 1 time in total.

craoson
Posts: 3
Joined: 2022-01-27 07:40

Re: apt source throws "Unable to find a source package" despite deb-src in sources.list

#2 Post by craoson »

I'm answering myself: the debian flavour has to be postfixed to the apt source command (with my configuration, at any rate):

Code: Select all

$ apt source hello/stable
Reading package lists... Done
Selected version '2.10-2' (bullseye) for hello
Need to get 733 kB of source archives.
...
dpkg-source: info: extracting hello in hello-2.10
dpkg-source: info: unpacking hello_2.10.orig.tar.gz
dpkg-source: info: unpacking hello_2.10-2.debian.tar.xz
$

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: apt source throws "Unable to find a source package" despite deb-src in sources.list

#3 Post by sunrat »

Good you worked it out. I never used sources and I assume a majority of other users haven't either so didn't know how.
It is preferable to post the contents of text config files here in CODE tags rather than hiding in a tarball. A lot more people would have looked at them if you did.
Remove deb-multimedia from your sources. Leaving that repo open has caused many issues.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

craoson
Posts: 3
Joined: 2022-01-27 07:40

Re: [SOLVED] apt source throws "Unable to find a source package" despite deb-src in sources.list

#4 Post by craoson »

Thanks for the hint about deb-multimedia

Post Reply